You are to implement the class DieType as per the header file **dietype.h** that is furnished for you. *Do not change **dietype.h**;* just write the function definitions in a file **dietype.cpp.**
Your main program should first (and repeatedly) present the user with the prompt:
1. Roll to test dice features.
2. Play me for cash.
3. Quit.
Ifthe user chooses (3), the program should end. If the user chooses (1), the following would be a typical exchange:
How many dice would you like to roll (up to 6)? 3
***
**
****
Die 1 is greater than Die 2.
Die 2 is less than Die 3.
A complete and correct version of the program that implements the class and menu options (1) and (3) is worth up to 75% of the credit for the project. For full credit, implement menu option (2) as follows:
I will give you 5-1 odds for one die, 10-1 odds for two dice, and 15-1 odds for three dice. You win if you guess the total; you get back your bet if any two dice have the same value. How many would you like to roll?
2
Choose your number: 5
***
****
Sorry, you lose. You owe $1. Play again (y/n)? Y
Choose your number: 7
****
****
No winner. You owe $1. Play again (y/n?) y
Choose your number: 8
*****
***
You win $10. You're up $9. Play again (y/n)? no
Please see the big guy out back to collect your $9. Bye!
1. Roll to test dice features.
2. Play me for cash.
3. Quit.
Your program should:
* Correctly solve the problem as stated, formatted as shown.
* Use an array of DieType objects to represent multiple dice.
* Correctly detect input that is outside of the acceptable range.
* Make appropriate use of functions.
* Use appropriate control structures (selection and/or looping).
* Have suitable top-of-file comments (Your name, the class, the assignment, the date, a one-sentence description of the function of the program
* Use named constants as appropriate.
* Have well-chosen variable/constant names.
* Use consistent typography and indentation to be neat and easily read.
## Deliverables
Pseudocode sketch of solution.
Source code.
Please follow the specifications and do not make
the code too complicated.
this is the header:
header file:
const int DIE_SIDES = 6;
class DieType {
public:
int GetSpots() const; // return current number of spots up
int Roll(); // roll the die, return the number of spots up
void PrintSpots() const; // print a row of asterisks, one per spot
bool Equal(DieType d) const; // return true if equal spots to die d
bool LessThan(DieType d) const; // return true if fewer spots than die d
DieType(); // default constructor
private:
int spotsUp; // number of spots on side currently up
bool beenRolled; // initially false, true once has been rolled
};
## Platform
PC Windows.