Search:

Type: Posts; User: chonch

Search: Search took 0.10 seconds.

  1. Replies
    9
    Views
    1,218

    Re: question about my applet

    yes that what im asking. i need the number to stay the same so if i have an instance variable, called int randomNumber. and had this returned would it stay the same?
  2. Replies
    9
    Views
    1,218

    Re: question about my applet

    no cuz im not sure on the return if i leave num as the return does it stay the same number until user guess the right price and my showstatus says "your right"
  3. Replies
    9
    Views
    1,218

    Re: question about my applet

    ok i have this now

    public int generateQuestion()
    {
    Random rand = new Random();
    int num = rand.nextInt(51) + 101;
    questionLabel.setText( "Guess oil price (100 - 150)" );

    return num;
    }
  4. Replies
    9
    Views
    1,218

    Re: question about my applet

    stuck at generating the number from 100 -150.
  5. Replies
    9
    Views
    1,218

    question about my applet

    need to write write a Java applet that will let the user guess the gas price and compare it with the price predicted by my program. Guess gas price (100 - 150): that never changes. so far i have this...
Results 1 to 5 of 5