Can you see what the code is doing? It is ALWAYS multiplying the numbers 10 times ONCE for each slot in the array. Shouldn't it just use what has been entered?
The reason the numbers go weird is...
Type: Posts; User: Norm
Can you see what the code is doing? It is ALWAYS multiplying the numbers 10 times ONCE for each slot in the array. Shouldn't it just use what has been entered?
The reason the numbers go weird is...
Also print these values:
what's in finalNumber when the method starts executing?
the value of placeValue every time it is changed inside the loop
Press 2 instead of 8
When an 8 is entered, what should be shown in the textarea?
Debug the steps in the getDisplayValue() method that compute the value of finalNumber.
Print the value of finalNumber every time its...
How, I don't see any println() statments that would show you what the code was doing.
When you added the println() statements I suggested:
When you enter the first number say an 8:
What printed...
Try debugging the code in the getDisplayValue() method by adding some println() statements that print out the values of all the variables that the method uses as it calculates the values.
Use the...
How is the code executed? I don't see the main() method in any class to start the execution.
That output was all from just entering a 9?
Ok, what numbers where you expecting instead of those?
Can you copy them and paste them here.
One problem I see is that the value returned by the getDisplayValue() method is not saved in a variable.
Please edit your post and wrap your code with code tags:
YOUR CODE HERE
to get highlighting and preserve formatting.