I am trying to add the arrays in the method anArray, but when i try to see the value, which should be 134/3 , it is returning "Their Test Sum = 33500" instead of the value of 134/3, why is it...
Type: Posts; User: LoganC
I am trying to add the arrays in the method anArray, but when i try to see the value, which should be 134/3 , it is returning "Their Test Sum = 33500" instead of the value of 134/3, why is it...
For example,
scores[3] = Integer.parseInt(strLine); ? I am not receiving an error on that but i want to return all of the scores and not just one of them
--- Update ---
Hmm wait, i think i...
Hmm I think I understand, but now I am getting an error saying ';' expected and return scores; is not a statement.
public static int[] processFile (int[] scores) throws IOException,...
Hello I am trying to sort a list of numbers on seperate files from a text document in C:/Scores.txt. First off in processFile I am trying to return the numbers located in the file as an array. I am...
It is just part of my assignment that I have to use the handScore method to figure out the "score" of the current hand of the beholder, I just wanted to test by using my own arrays and then modify...
Would this be the correct application?
public int handScore () {
Card threeOfClubs = new Card (0, 3);
Card aceOfHearts = new Card (3, 1);
Card...
I am having some trouble understanding how to assign values to objects. I am trying to assign it so that method handScore will return the four cards in the method. I want to make it so that Ace of...
I have tried removing the parameters and still I am getting cannot find symbol on card.printCard();
public class Card {
int suit, rank;
public Card () {
this.suit = 0;...
Hello Curmudgeon, what if I want to pass (1, 11) into the method printCard? Would I add (1, 11) into the printCard method?
--- Update ---
Also, in main I have tried adding card.printCard(); and...
I am trying to print from a different class, and this is my current code. The last code entry is the mainclass, and "Card" is showing up as cannot find symbol error. I am trying to print printCard...
I am having trouble trying to call printArray in main. I want to output (array) in the method printArray.
/*
* To change this template, choose Tools | Templates
* and open the template in the...
This is the part of the homework where I am stuck:
Write a modifier named reduce that reduces a rational number to its lowest terms by finding
the GCD of the numerator and denominator and then...
I could do that, but I do not know how to read each line seperately.
Update: I was able to add up all of the integers, and display what it equals, but now how do i get the mean or avg of these?
For...
In my textfile, my goal is to add up the sum of all the integers, the text file is in a formal like this;
15
14
23
18
74
38
One per line. That is the only thing in the textfile, integers. I am...
Any help would be appreciated. I added a parse to double, so now the string that is read from the file is converted to a double.
My program works effectively, but now I have to add up the total of the integers. How would I go about doing this? The program is just reading a simple file in c:/ which it does, and displays the...
Still need a little help w/ this.
Cannot find value append.... :s
How do i add a new line in Swing? Im using netbeans, here is my source code:
This is what it outputs:
I want the output to be organized, like this:
1 Computer - 706
100 Computers = 70600
200...
Sorry for the confusion, I deleted the duplicate method and I am trying to add up the sum of all the elements in the method to a total. What should I try next?
So instead of declaring them in the if statements, I should just return them?
Fixed. I am trying to add up the returns of all of my if statements, but where I have tried to do it, they all say
double finalCostOfComputer = computerBase+printer+speakers+mouse+mousepad+headset...
Few errors: in bold: cannot find symbol ( for the things in bold )
trying to add together the if statements, but it isn't working, Im confused. My question is, how do i add what my if statements...
I am trying to learn some swing this week, one program I found to try and make was a simple GUI with checkboxes and buttons, which I have already made. The program would be used for selling computers...
Hmm all areas are gone, but it's still not printing out for some reason.
private void NameCheckerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_NameCheckerActionPerformed
...