Create and deploy a programme that uses numbers to play the Hi-Lo guessing game. The software ought to choose a random number between 1 and 100 (inclusive) and then ask the user to estimate it again. Inform the user if their estimate was right, high, or low for each guess. Accept guesses until the user decides to stop or guesses right. To ascertain if the user wishes to exit, utilise a sentinel value. When the user successfully guesses, tally the number of guesses and report that figure. Ask the user if they want to play again when each game is finished (by leaving or a successful guess). Play video games till the user decides to quit.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter6: Looping
Section: Chapter Questions
Problem 5GZ
icon
Related questions
Question

Create and deploy a programme that uses numbers to play the Hi-Lo guessing game. The software ought to choose a random number between 1 and 100 (inclusive) and then ask the user to estimate it again. Inform the user if their estimate was right, high, or low for each guess. Accept guesses until the user decides to stop or guesses right. To ascertain if the user wishes to exit, utilise a sentinel value. When the user successfully guesses, tally the number of guesses and report that figure. Ask the user if they want to play again when each game is finished (by leaving or a successful guess). Play video games till the user decides to quit.

Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Linux
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT