Part I (Chapter 4 & 5): Guess a number from 1 to 100
Example of Run-time Output Console
Welcome to the Guess the Number Game
++++++++++++++++++++++++++++++++++++
I'm thinking of a number from 1 to 100.
Try to guess it.
Enter number: 50
You got it in 1 tries.
Great work! You are a mathematical wizard.
Try again? (y/n): y
I'm thinking of a number from 1 to 100.
Try to guess it.
Enter number: 50
Way too high! Guess again.
Enter number: 30
Too high! Guess again.
Enter number: 15
Too low! Guess again.
Enter number: 23
Too high! Guess again.
Enter number: 19
Too low! Guess again.
Enter number: 21
Too high! Guess again.
Enter number: 20
You got it in 7 tries.
Not too bad! You've got some potential.
Try again? (y/n):
Error! This entry is required. Try again.
Try again? (y/n): x
Error! Entry must be 'y' or 'n'. Try again.
Try again? (y/n): n
Bye - Come back soon!
Press any key to continue . . .
Operation
• Write a class called GuessGame with all business logics for guess game, Use the Validator class in
The answer to the question is available in the PDF file https://assignmentexpert.com/https://assignmentexpert.com/homework-answers/programming-answer-47620.pdf
Comments
Leave a comment