Project 7-3: Guessing Game
Convert a previous application so it uses classes to organize its code.
We Write Essays for Students
Tell us about your assignment and we will find the best writer for your paper
Get Help Now!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!
Specifications
Your instructor should provide you with a starting project.
Create a class named Console, and move all the methods that retrieve and validate user input to that class. These methods can remain static.
Create a class named Game, and move all the methods that display messages and handle user guesses to that class. Adjust these methods so they aren’t static, and use instance variables of the Game class to keep track of numbers, guesses, and so on.
Update the application to use these classes and their methods. Make sure the application functions the same as it did before.
The post Project 7-3: Guessing Game appeared first on Timely Writings.
Welcome to originalessaywriters.com, our friendly and experienced essay writers are available 24/7 to complete all your assignments. We offer high-quality academic essays written from scratch to guarantee top grades to all students. All our papers are 100% plagiarism-free and come with a plagiarism report, upon request
Tell Us “Write My Essay for Me” and Relax! You will get an original essay well before your submission deadline.
