Search:

Type: Posts; User: Norm

Search: Search took 0.10 seconds.

  1. Thread: Methods help????

    by Norm
    Replies
    24
    Views
    1,550

    Re: Methods help????

    What does "run a random number" mean? If the method generates a number, how is the number made available to the rest of the program?
  2. Thread: Methods help????

    by Norm
    Replies
    24
    Views
    1,550

    Re: Methods help????

    What does "runs a random number" mean?
    What does the program do with the user's random guess?
    Hint: it completely ignores what the user entered.
  3. Thread: Methods help????

    by Norm
    Replies
    24
    Views
    1,550

    Re: Methods help????

    Stop writing code and work on the logic. Your changes seem random.

    The code still does not save what getGuess() returns.
    What does getGuess() do that helps the program execute?

    To see what...
  4. Thread: Methods help????

    by Norm
    Replies
    24
    Views
    1,550

    Re: Methods help????

    Where does the new code receive the value returned by the getGuess() method? It needs to assign it to a variable. Then what is done with it?

    Where is the value of guess tested after it is read...
  5. Thread: Methods help????

    by Norm
    Replies
    24
    Views
    1,550

    Re: Methods help????

    Post the new code so we can see what the problem is now.
  6. Thread: Methods help????

    by Norm
    Replies
    24
    Views
    1,550

    Re: Methods help????

    Where does the code change the value of the guess variable that controls the while loop? It is set to 0 and never changed.

    Read up on how java passes variables to methods. It passes the value of...
  7. Thread: Methods help????

    by Norm
    Replies
    24
    Views
    1,550

    Re: Methods help????

    Look at the definition for the getGuess() method. You need to call it with the arguments that it requires.

    The question I have is: Why does getGuess() need a double value passed to it as an...
  8. Thread: Methods help????

    by Norm
    Replies
    24
    Views
    1,550

    Re: Methods help????

    Either add a double as argument in the call to the method
    or remove the argument from the definition of the method.
  9. Thread: Methods help????

    by Norm
    Replies
    24
    Views
    1,550

    Re: Methods help????

    The compiler is saying you need to use a double argument when you call the getGuess() method. It did not find any arguments being used.

    Why does the getGuess() method have an argument? It is not...
  10. Thread: Methods help????

    by Norm
    Replies
    24
    Views
    1,550

    Re: Methods help????

    Please copy the full text of the error message and paste it here.
Results 1 to 10 of 10