Question: i need part one and 2 In c++ code Before 11:59PM The purpose of thislaboratoryassignment is to introducestudents to using and writing classes. Part I
The purpose of thislaboratoryassignment is to introducestudents to using and writing classes. Part I - Understand a Given Class (die class) ( 40pts ) - Download the die class, save it as Lab5UseDieClassFirstNameLastName.cpp - Add proper opening comments at the beginning of the program. - Run the program and answer the following questions: - How many objects are created in this program (in main function)? - What is the name of each object? - What is the face value of a die object on creation? - Copy and paste these Q\&A to the end of opening comment section Part II - Use the die class ( 60pts ) - Add a section of code to the end of main() function by write the following two cout statements: int main () i 1/ original code are omitted here 11 cout Beginning of Part. II endl; II part II code goes here return 0; - (20 pts) Roll die 1 and die2 for 2000 times, and compute the times that two die has the same values fie. Both are 1 , or both are 2 , etc). Print this count with a proper label. - (20 pts) Roll die1 and die2 as many times as needed, until the first pair of 6 occurs. Print the count needed to get this result. Don't forget label your output. - (20 pts) Roll die1 and die 2 for 2000 times, and compute the times when the sum of two dice is an even number (the sum is 2 or 4 or 6 or or 8 ... or 12). Print this count out with a proper label. The purpose of thislaboratoryassignment is to introducestudents to using and writing classes. Part I - Understand a Given Class (die class) ( 40pts ) - Download the die class, save it as Lab5UseDieClassFirstNameLastName.cpp - Add proper opening comments at the beginning of the program. - Run the program and answer the following questions: - How many objects are created in this program (in main function)? - What is the name of each object? - What is the face value of a die object on creation? - Copy and paste these Q\&A to the end of opening comment section Part II - Use the die class ( 60pts ) - Add a section of code to the end of main() function by write the following two cout statements: int main () i 1/ original code are omitted here 11 cout Beginning of Part. II endl; II part II code goes here return 0; - (20 pts) Roll die 1 and die2 for 2000 times, and compute the times that two die has the same values fie. Both are 1 , or both are 2 , etc). Print this count with a proper label. - (20 pts) Roll die1 and die2 as many times as needed, until the first pair of 6 occurs. Print the count needed to get this result. Don't forget label your output. - (20 pts) Roll die1 and die 2 for 2000 times, and compute the times when the sum of two dice is an even number (the sum is 2 or 4 or 6 or or 8 ... or 12). Print this count out with a proper label
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
