Question: Design and implement an application that plays the Hi-Lo guessing game with numbers. The program should pick a random number between 1 and 100 (inclusive),

  1. Design and implement an application that plays the Hi-Lo guessing game with numbers. The program should pick a random number between 1 and 100 (inclusive), then repeatedly prompt the user to guess the number. On each guess, report to the user that they are correct or that the guess is high or low. Continue accepting guesses until the user guesses correctly or chooses to quit. Count the number of guesses and report that value when the user guesses correctly. If a guess is out of the range 1 to 100, an appropriate message should be displayed to the user and the guess not be counted. At the end of each game (by quitting or a correct guess), prompt to determine whether the user wants to play again. Continue playing another game until the user chooses to stop.

    Hint: This will require a nest of loopsthe outer loop to play each game until the user chooses to stop and the inner loop to prompt the user for each guess in a game.

    Testing: Include exhibits that demonstrate all the programs features: multiple completed games, a game quit in progress, and how an input out of range is handled.

In Java

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!