Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Listed on the following page is a Dice class that simulates rolling a die with a

ID: 3908815 • Letter: L

Question

Listed on the following page is a Dice class that simulates rolling a die with a different number of sides. The default is a standard die with six sides. The rollTwoDice function simulates rolling two dice objects and returns the sum of their values. A driver program is shown that simulates a dice game by rolling a pair of dice 10 times. In the space below, create your own class LoadedDice that is derived from Dice, with the following requirements: .Provide a default constructor, and a constructor that takes the number of sides as input. Recall that a derived class constructor should call the corresponding base class constructor in order to initialize base class member variables. override the roll Dice function so that with a 50% probability the function returns the largest number possible (i.e., nums ides), Dice's rollDice function returns. . and with a 50% probability returns what . Indicate the change that must be made to the rollDice function in the Dice class so that the rollDice function in the LoadedDice class will be called in all appropriate circumstances. (You may write your change directly in the listing of the Dice elass on next page.) Hint: The following relational expression can be used to generate a 50-50 probability: (rand () % 2--0) // returns true if the random number is an even num

Explanation / Answer

I know the solution to this problem. Just give me a couple of hours while i implement it with detailed comments and screenshots for better understanding. I assure you that you won't be disappointed in the solution at all. :):)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote