Question: What is the program solution in C++'s Visual Studio Code system that will help me create that will help me create this game for my
What is the program solution in C++'s Visual Studio Code system that will help me create that will help me create this game for my Object-Oriented Programming Assignment?

Here's the code for the game.cpp file.
#include#include #include #include #include "guess.h" using namespace std; int main() { ifstream fs("phrases.txt"); int phrase_count = 0; string phrases[1000]; while (getline(fs,phrases[phrase_count])) phrase_count++; string snowmen[] = { " _ _|_|_ ('_') +--( : )--+ (_______) ", " ___ ('_') +--( : )--+ (_______) ", " ___ ('_') +--( : ) (_______) ", " ___ ('_') ( : ) (_______) ", " ___ ('_') (_____) ", " ___ ('_') ", }; std::default_random_engine generator(chrono::system_clock::now().time_since_epoch().count()); int winner = generator() % phrase_count; GuessingGame game(phrases[winner]); while (!game.isComplete() && game.getMistakes() > letter; game.makeGuess(letter); } if (game.isComplete()) cout Snowman Class Create a C++ class to represent a phrase guessing game like Snowman. Specifically, your class should provide the following public interface: GuessingGame (string answer)a constructor (you are given the answer phrase) bool isComplete() asks if all letters have been revealed string getRevealed() show any revealed letters, so far void makeGuess (char letter) guess a letter int getMistakes () how many mistakes have been made so far? string getAnswer() show the answer (in case they lose) Download game.cpp to see how your class will be used. You can also download phrases.txt, or create your own, so you can play the game. There are at least two methods to solve this problem. In the first method, makeGuess() simply records the player's guess and do no other work. This could be accomplished by appending the letter to a string of guesses. Later when isComplete(), getMistakes () or getRevealed() is called, the correct response can be computed using the answer and the guesses. In this case, only the answer and the guesses need to be stored as member variables. Alternatively, makeGuess() could immediately perform computations, updating the number of mistakes and the new revealed phrase. This makes getMistakes() and getRevealed() much simpler, but makeGuess() is much more complicated. Similarly, whether is complete() simply returns a value or performs a computation depends exactly what makeGuess() does. In this case, several member variables are required, these include the answer, the revealed version of the answer, and the number of mistakes. This type of choice, which function is easy and which is complex, is common when writing classes. Sometimes the choice affect the performance of the class. For now, just choose the method that is most intuitive to you. Notice that the user may enter letters in either upper- or lower-case and they should match letters in the answer in either case. You should investigate and consider using the standard functions toupper() and/or tolower(). Your solution does not need to be concerned with any punctation marks. However you are encouraged to support punctuation marks similar to spaces. That is, they may appear in a phrase, are initially revealed, and cannot be guessed. Submit your work as a header file. Snowman Class Create a C++ class to represent a phrase guessing game like Snowman. Specifically, your class should provide the following public interface: GuessingGame (string answer)a constructor (you are given the answer phrase) bool isComplete() asks if all letters have been revealed string getRevealed() show any revealed letters, so far void makeGuess (char letter) guess a letter int getMistakes () how many mistakes have been made so far? string getAnswer() show the answer (in case they lose) Download game.cpp to see how your class will be used. You can also download phrases.txt, or create your own, so you can play the game. There are at least two methods to solve this problem. In the first method, makeGuess() simply records the player's guess and do no other work. This could be accomplished by appending the letter to a string of guesses. Later when isComplete(), getMistakes () or getRevealed() is called, the correct response can be computed using the answer and the guesses. In this case, only the answer and the guesses need to be stored as member variables. Alternatively, makeGuess() could immediately perform computations, updating the number of mistakes and the new revealed phrase. This makes getMistakes() and getRevealed() much simpler, but makeGuess() is much more complicated. Similarly, whether is complete() simply returns a value or performs a computation depends exactly what makeGuess() does. In this case, several member variables are required, these include the answer, the revealed version of the answer, and the number of mistakes. This type of choice, which function is easy and which is complex, is common when writing classes. Sometimes the choice affect the performance of the class. For now, just choose the method that is most intuitive to you. Notice that the user may enter letters in either upper- or lower-case and they should match letters in the answer in either case. You should investigate and consider using the standard functions toupper() and/or tolower(). Your solution does not need to be concerned with any punctation marks. However you are encouraged to support punctuation marks similar to spaces. That is, they may appear in a phrase, are initially revealed, and cannot be guessed. Submit your work as a header file
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
