Question
**DICE.H file ** #ifndef __DICE_H__ #define __DICE_H__ #include #include #include using namespace std; class Dice { private: int _numSides; vector _latestRoll; public: /* Default number
**DICE.H file **
#ifndef __DICE_H__ #define __DICE_H__
#include
class Dice { private: int _numSides; vector
#endif // __DICE_H__
Main.CPP:
#include
using namespace std;
int main() { // Die will all be 0 until setSeed and rollDice called Dice d1; // 2 6-sided dice cout
// Dice d3 = Dice(4, 20); // 4 20-sided dice // d3.setSeed(101110); // d3.rollDice(); // cout
return 0; }
Implement a Dice class. 1. The required Dice member function declarations (interface) have already been included in the Dice.h file. Do not change these. Do not add any other public member functions. 2. The private member variables have been provided as well. Feel free to remove any you don't use or add any if you want. You may also change their names if you want. 3. You must implement all functions in the Dice.cpp file. 4. You should uncomment statements in the main function as you implement the member functions contained within each statement. These are there to help you understand what each function does as well as test them. You will need to eventually uncomment all statements to pass all feedback output tests. 5. You will also need to implement an overloaded output (insertion) operator (already declared within the Dice.h file). You will want to do this early so that you can test your results as you go. 6. The specifications for each member function is provided in the Dice h file. Implement a Dice class. 1. The required Dice member function declarations (interface) have already been included in the Dice.h file. Do not change these. Do not add any other public member functions. 2. The private member variables have been provided as well. Feel free to remove any you don't use or add any if you want. You may also change their names if you want. 3. You must implement all functions in the Dice.cpp file. 4. You should uncomment statements in the main function as you implement the member functions contained within each statement. These are there to help you understand what each function does as well as test them. You will need to eventually uncomment all statements to pass all feedback output tests. 5. You will also need to implement an overloaded output (insertion) operator (already declared within the Dice.h file). You will want to do this early so that you can test your results as you go. 6. The specifications for each member function is provided in the Dice h fileStep 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