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 // ------------------------------------------------------------------------------------------------
![#include <ctime>
#include <iostream>
#include <stdlib.h>
#include 'Guesser.h"
int main()
{
11
}
srand(static_cast<unsigned int>
(time(nullptr)));
std::cout << "Guess my number, won't ya?!"
<< std::endl;
int guess;
Guesser g;
do
{
std::cout << "Enter your guess:
std::cin >> guess;
} while (g. MakeGuess (guess)
return 0;
==
11
false);](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F1784d6b6-d0da-4ca6-88bb-f1a2aff3fb92%2F3028ccf1-ea75-4282-8e57-08626c90a5ff%2F3168c8w_processed.jpeg&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 4 steps with 3 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)