Question: I need simple java solution Using JOptionPane. Time to play a game. Your job is to write a program that will let the user guess

I need simple java solution Using JOptionPane.

Time to play a game. Your job is to write a program that will let the user guess a number between 1 and 100 (inclusively).

  • If the users guess is higher than the random number, the program should display Your guess was too high, please try again.
  • If the users guess is lower than the random number, the program should display Your guess was too low, please try again.
  • If the user guesses the number correctly, the program should display Your guess was correct. It too you xxx guesses to get it correct.

Your program will have to create a random number from 1 to 1024 (inclusively) at the start of the program. You will have to keep track of the number of guesses and include it when the user guesses the number correctly.

Input and output should be done with Dialog and Message boxes.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!