Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Java language Thank you? Problem 1. (Guessing Game) In this problem you will be creating a game that you play against the computer. Make a
Java language
Thank you?
Problem 1. (Guessing Game) In this problem you will be creating a game that you play against the computer. Make a class named GuessingGame - when executed, this program should randomly generate a secret integer from 1 to 100, and then instruct the user to try to guess what it is. After each guess the program will tell them if they are too high, too low, or if they got it right - and if they got it right it will congratulate them, tell them how many guesses it took them, and offer to either play again or exit the program. An example interaction with this program follows: .Please guess a number between 1 and 100: 50 Too low! Guess again: 75 Too high! Guess again: 63 Good job, you got it after 3 guesses! Want to play again (Y or N)? Thanks for playing! After you have made this game, play it some and try to figure out the best strategy. In a text file called HowToGuess.txt, explain the best strategy you employed to play the game and about how many guesses it usually took you to get theStep 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