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 // ------------------------------------------------------------------------------------------------

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
100%

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 // ------------------------------------------------------------------------------------------------

#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);
Transcribed Image Text:#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);
Expert Solution
steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY