Search:

Type: Posts; User: Norm

Search: Search took 0.10 seconds.

  1. Replies
    18
    Views
    924

    Re: Simple Calculator HELP

    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...
  2. Replies
    18
    Views
    924

    Re: Simple Calculator HELP

    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
  3. Replies
    18
    Views
    924

    Re: Simple Calculator HELP

    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...
  4. Replies
    18
    Views
    924

    Re: Simple Calculator HELP

    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...
  5. Replies
    18
    Views
    924

    Re: Simple Calculator HELP

    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...
  6. Replies
    18
    Views
    924

    Re: Simple Calculator HELP

    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?
  7. Replies
    18
    Views
    924

    Re: Simple Calculator HELP

    Ok, what numbers where you expecting instead of those?
  8. Replies
    18
    Views
    924

    Re: Simple Calculator HELP

    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.
  9. Replies
    18
    Views
    924

    Re: Simple Calculator HELP

    Please edit your post and wrap your code with code tags:


    YOUR CODE HERE

    to get highlighting and preserve formatting.
Results 1 to 9 of 9