Question
Programming with C++ Project 6 Write a simple game (program) that two people can play. The program prompts the first player to enter an integer
Programming with C++ Project 6 Write a simple game (program) that two people can play. The program prompts the first player to enter an integer greater than or equal to 0, and but not greater than 100. The program then prompts the second player to guess the number that was entered by the first player. When the second player enters the correct number, the program displays an appropriate message and the number of guesses it took to guess the correct number. If the guessed number is less than the correct number, the program outputs the message, \"Your guess is lower than the correct number\"; otherwise, the program outputs the message \"Your guess is higher than the correct number\". The program then prompts the second player to enter another number. The second player is prompted to guess the correct number until he or she enters the correct number. Remember, when the program ends, it always outputs the number of guesses it took to guess the correct number. Your solution must be separated into, at least, three source files (Interface, Implementation, and Test). There should only be minimal code in the Test file -- just enough to instantiate an object, and invoke the appropriate function(s). All prompting for user input, as well as all the statements that receive and manipulate user input must be placed in the implementation file, not in the test file.
Please use 3 files 1 .h 2 .cpp and make sure it works. Please look over the criteria shows you how it should be done.
Please read how it is graded
Compilation errors in your program Program will be rejected. No points. Not separating your solution into three files (interface, implementation, and test files) -30 points
Do not hard code any user input into your program. You must prompt for all input to be provided interactively at run-time. Otherwise -30 points
Your program provides any incorrect response to the second players guesses -20 points
When the program ends, it outputs the number of guesses it took to guess the correct number. Otherwise -10 points
If any code is placed in the Test file beyond what is needed to instantiate an object and invoke the appropriate function(s) -30 points
Do not use an instance variable if a local variable will suffice. For each unnecessary use of an instance variable -5 points
Allowing the first player to enter a number that is outside of 0 - 100 -10 points
Any incorrect looping algorithm -20 points Not terminating the program
correctly, or creating a program that remains in an infinite loop
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started