The code is probably in an infinite loop. To find where the loop is, you need to do some debugging. Add some println statements that print out messages as methods are called and as loops are...
Type: Posts; User: Norm
The code is probably in an infinite loop. To find where the loop is, you need to do some debugging. Add some println statements that print out messages as methods are called and as loops are...
Please post the code for the whole program.
Don't hide }s at the end of a statement. That makes the code hard to read and understand. }s should be on a line by itself.
The compiler found a call to minValue() that did not have an arg.
You must ALWAYS pass an arg to minValue(). minvalue will use the value passed to it in the current call to the method, not one...
If minValue() requires an int parameter, the code needs to give it a parameter.
Yes, that looks closer.
minValue returns false too soon. It should wait until all of the elements have been tested.
You should Add a comment to the code saying what the method is supposed to do....
First get a design to describe what the code is to do. Then work on coding it.
I suggested an approach in posts #8 & #10
Putting two statements on the same line sort of hides the second statement and makes the code hard to read:
if(scoreboard[j] != value)multiToss();
Would that statement stop any additions to the...
What happened to the loop in multiToss() that was supposed to continue executing until all the counts were at desired value? See post#10
That only tests 1 of the possible counts.
What are the valid values of the score variable? Does it ever get > 12?
Where are the counts that you want to compare against?
The loop needs to continue until the condition is met.
Use a while loop that continues executing until the method that checks if the condition is met returns true.
while(not done) {
compute...
Then there needs to be code inside the loop that tests if all the counts are at the desired level.
A good solution would be to call a method that returned a boolean: true if the counts are at the...
Does that mean that the program should continue executing the loop until all the roll counts are >= the value entered by the user?
Can you explain what is wrong with that output? What do you want to see in the second column.
I assume the first column is just a row number.
System.out.println("toss of "+ j + " " +...
Can you post the current output for comparison so we can see what is wrong?