Question: Write an interactive Java program. Write a number guessing game program. Ask the player how many games they would like to play. Then ask the
Write an interactive Java program. Write a number guessing game program. Ask the player how many games they would like to play. Then ask the player to pick a difficulty level for the games. Easy:1-5, Normal: 1-10, Hard: 1-100. Prompt the user to start guessing numbers, giving them hints as to whether they are to hi or low along the way. Keep up with the total number of guesses taken for a match summary after all games complete. It should look something like this:
How many games would you like to play: 2 Would you like the games to be easy, normal, or hard: normal Guess a number between 1-10: 5 To high. Guess again: 3 Correct! Guess a number between 1-10: 5 To low. Guess again: 7 To high. Guess again: 6 Correct! It took you 5 guess to win 2 games, Congratulations! It took you an average of 2.5 guesses per game!
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
