Question: C++ .hpp .cpp .main 1:151 LTE Module 6 Lab 4 Detail Grade Lab 4 No due date Write a class called Die that has an
1:151 LTE Module 6 Lab 4 Detail Grade Lab 4 No due date Write a class called Die that has an int data member for how many faces the die has. There should be a default constructor that initializes the number of faces to 2. There should be a constructor that takes one parameter and initializes the number of faces to the value that is passed. There should be a method called roll that returns a random integer from 1 to the number of faces. Write a class called DiceCup that has 3 Die data members. There should be a constructor that takes three parameters and initializes its data members to the objects that are passed. There should be a method called roll that returns the sum of the rolls of its 3 dice (yes, both classes have a method named roll it just seemed like the obvious name in both cases) Write a main function that demonstrates these classes Previous Next To Do Inbox
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
