Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started