Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In c++ language write. Please double check outputs sample and conditions. 100% perfection. Use linux terminal and not visual studio headers etc. Description For the
In c++ language write. Please double check outputs sample and conditions. 100% perfection. Use linux terminal and not visual studio headers etc.
Description For the assignment, you will implement a class that runs a classic word guessing game. You will need to implement the following class class wordGuess public: static const int MAX_SIZE - 20; wordGuess(); wordGuess (string); bool makeGuess (char); char game0ver O const string getPuzzle () const; private: string theWord; bool correct [MAX_SIZE]; int attempts; int maxAttempts; Description of Members Each member will perform/contain the following string theWord - contains the word that is to be guessed static const int MAX_SIZE20 - the maximum size of the word bool correct [MAX_SIZE] - boolean array that marks which letters have been guessed or not int attempts - keeps track of the number of attempts the user made int ma:Attempts-contains the maximum number of attempts the user has wordGuess () default constructor, sets default values to all the members of the class (zeros for numbers, empty strings, false, etc.) however if one of the characters in the string is a space, you set that element in the boolean array to a true wordGuess (string) - constructor that takes in a string which will be the word to be guessed, sets everything else to defaults and maxAttempts will be size of the word multiplied by 2Step 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