Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribedAnswer 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Database Modeling With Neo4j

Authors: Ajit Singh

2nd Edition

B0BDWT2XLR, 979-8351798783

More Books

Students also viewed these Databases questions

Question

What are chief criticisms of neuroeconomic studies?

Answered: 1 week ago