They should also have the option of starting the game over


Write a GUI application that plays "Guess the Number." It begins by choosing the number to be guessed by selecting an integer at random in the range 1-1000. The user will have ten tries to guess the number. When the game is over, the user should not be allowed to enter any more guesses. They should also have the option of starting the game over with a new random number to guess.

The game will be played using the following GUI components:

  • A JLabel should display a message similar to, "I'm thinking of a number between 1 and 1000. Guess it!"
  • A JTextField should be used to input the guess.
  • A JLabel should tell the user how many guesses are remaining.
  • A JLabel should display either "Too High", "Too Low", "Correct!" or "You Lose!"

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: They should also have the option of starting the game over
Reference No:- TGS02383941

Now Priced at $20 (50% Discount)

Recommended (99%)

Rated (4.3/5)