This assignment moves us past simple single-file programs into more interesting
ID: 3884617 • Letter: T
Question
This assignment moves us past simple single-file programs into more interesting multi-file program:s We also write a game that, if not a viable League of LegendsTM competitor, is at least reasonably enjoyable at the Extreme Bonus level. Along the way, we'll utilize a Makefile, either the ddd or gdb debugger, and Umbrello to design our class and use case diagrams Full Credit Requirements Boom is a classic word or phrase guessing game with limited tries and something catastrophic if the word is missed - a firecracker goes (you guessed it) "Boom!". A game in progress looks something like the screen shot to the right. Below is a simple UML class diagram of the Full Credit version of the game. Note that Main isn't actually a class it's simply the usual main function. This time around, implement a h and cpp for each class ain + main): int izzl use - solution : string - quesses 2551: bool + Puzzle(solution : string) + guess(c: char): boo + solve(proposed solution: string): string + to_string): string + get solution(): strin - time: int + Fuse(time: int + burn(): bool + to string): strin The Puzzle class represents the game. The solution field is the string that is the word or phrase the player is trying to guess. The guesses array (like a vector, but without methods) holds a Boolean for each ASCII character. For example, guesses[a is true if 'a' has been guessed, false if not. The Puzzle constructor accepts the solution, which should be stored in _solution. The guess method accepts a single character (the player's guess), and returns true if the character is valid (between 'a' andExplanation / Answer
class Puzzle
{
private:
string solutioin;
char c;
string Proposed_solution;
public;
void puzzle(string solution)
{
if solution = 'a' then
cout<<"Guess is ture"
cout<<"Guess is false"
return solution;
}
//Function to print Welcome message
void Welcomemsg()
{
cout<<"================================";
cout<<"BOOM !"
cout<<"================================";
}
};
//solution for 3b question
#include<iostream>
using namespace std;
int main()
{
//local variable decleration:
int a;
cout <<" enter the option"
cin >> a;
switch(a)
{
case '0':
exit();
break;
case'!':
if proposed_solution = true then
winner();
else
lose();
endif
default:
cout << "invalid character" <<endl;
break;
default:
cout << "Invalid grade" << endl;
}
function winner()
winner()
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.