C++ programming I need a implementation (guesser.cpp) a header file (guesser.h) and source.cpp the runner file at the end. The runner file attached as an image . Use it as source.cop but do not change it. Create a Guesser class that contains the following data and functionality: A member variable is needed that holds the number you're trying to guess A constructor for the class will be needed Set the member variable to a value that is randomly in the 1-15 range inclusive on both ends A function named MakeGuess will be needed It takes a parameter which is the guess the player has made If the guess is correct: Print out as shown in the runner file Return true If the guess is zero: Print out as shown in the runner file Change the member variable to a value that is randomly in the 1-15 range inclusive on both ends Return false If the guess is not correct: Print out as shown in the runner file Return false Make sure to follow all OOP encapsulation and data hiding rules we discussed in lecture and previous homework assignments Submit your solution as a plain ZIP file that contains the three files your program needs to execute properly Match your output to the following example program execution: Guess my number, won't ya?! Enter your guess: 7 Nope! That's not it! Enter your guess: -8 Nope! That's not it! Enter your guess: 0 Who would ever pick zero? That would be cheating or something! Just for that I'm going to think up a new number for you! Enter your guess: 5 Nope! That's not it! Enter your guess: 4 Nope! That's not it! Enter your guess: 7 You got it! Lucky you! I'm outta here! Make sure to create a Guesser.h and Guesser.cpp file that works with this runner file // * DO NOT MODIFY ANYTHING FOUND IN THIS RUNNER FILE // ------------------------------------------------------------------------------------------------
C++ programming
I need a implementation (guesser.cpp) a header file (guesser.h) and source.cpp the runner file at the end.
The runner file attached as an image . Use it as source.cop but do not change it.
Create a Guesser class that contains the following data and functionality:
- A member variable is needed that holds the number you're trying to guess
- A constructor for the class will be needed
- Set the member variable to a value that is randomly in the 1-15 range inclusive on both ends
- A function named MakeGuess will be needed
- It takes a parameter which is the guess the player has made
- If the guess is correct:
- Print out as shown in the runner file
- Return true
- If the guess is zero:
- Print out as shown in the runner file
- Change the member variable to a value that is randomly in the 1-15 range inclusive on both ends
- Return false
- If the guess is not correct:
- Print out as shown in the runner file
- Return false
-
Make sure to follow all OOP encapsulation and data hiding rules we discussed in lecture and previous homework assignments
Submit your solution as a plain ZIP file that contains the three files your program needs to execute properlyMatch your output to the following example program execution:
Guess my number, won't ya?!
Enter your guess: 7
Nope! That's not it!
Enter your guess: -8
Nope! That's not it!
Enter your guess: 0
Who would ever pick zero? That would be cheating or something!
Just for that I'm going to think up a new number for you!
Enter your guess: 5
Nope! That's not it!
Enter your guess: 4
Nope! That's not it!
Enter your guess: 7
You got it! Lucky you! I'm outta here!
Make sure to create a Guesser.h and Guesser.cpp file that works with this runner file // * DO NOT MODIFY ANYTHING FOUND IN THIS RUNNER FILE // ------------------------------------------------------------------------------------------------


Step by step
Solved in 4 steps with 3 images









