Question: Dice Roll Simulator Write a class named Dice. The Dice class should have the following member variable: A integer named sideUpValue. The sideUpValue member variable

Dice Roll Simulator Write a class named Dice. The Dice class should have the following member variable: A integer named sideUpValue. The sideUpValue member variable will hold the value (1,2,3,4,5,6) facing up when the dice is rolled. The Dice class should have the following member functions: A void member function named Roll that simulates the Rolling of the dice. When the Roll member function is called, it randomly generates the value of the dice that faces up (1,2,3,4,5,6) A member function named getSideUp that returns the value of the sideUp member variable. Write a program that demonstrates the Dice class. The program should create an instance of the class and display the side that is initially facing up. Then, use a loop to throw the dice 100 times. After which display a Column chart showing how much each number showed up. Something like this: 1 ***************** 2********************************** 3***************** 4*************************************************** 5***************** 6**********************************

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!