Question: Answer in C++ please Create a dice simulator. Start by writing a die class that can represent a certain number of sides such as a
Answer in C++ please Create a dice simulator. Start by writing a die class that can represent a certain number of sides such as a standard D6. e Create a constructor for setting up the die with appropriate sides. Make a member function for rolling the die. This function should simulate a random number between 1-x ( sides of die). The number will then be assigned to the value parameter of the die Make a member function that will get the value of the die. This will be a simple accessor function. Write a program to implement two dice using the class and that will simulate their functionality use whatever programming you feel necessary to display and show off your dice simulator. Ask the user for how many sides they would like on their dice. Allow the user to continue rolling untill they choose to quit testing the simulation Tips for success This is a chance for your design and skills application to shine. Don't skimp on the functionality. Don't forget to use constants when you can Make sure the class is in a h file and member functions are in a.cpp file Make sure you're returning ints and not chars/strings when getting dice values. It's crucial we be able to treat these as mathematical values. Remember, data is private by default. Keep it that way and build lanes to safely access the data. Keep that vision
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
