Question: Making the program in a windows form app on visual studios or a console app. Write a Dice class. The class should have: *A private

Making the program in a windows form app on visual studios or a console app.

Making the program in a windows form app on visual studios or

Write a Dice class. The class should have: *A private field for the number of sides of the die A constructor that takes an integer between 4 and 20, inclusive and sets the number of sides of the die A method, rollDie), returns the face value when the die is rolled. Use a Random number to "roll" the die. Write a driver program. This program should create two die with the same number of sides, continually roll the dice and report the result of each roll. It should stop when "snake eyes" are rolled (double 1's) and report the number of rolls. You may write this as a console application or a Windows Forms application. Here's an example: Form1 Roll Dice Write a Dice class. The class should have: *A private field for the number of sides of the die A constructor that takes an integer between 4 and 20, inclusive and sets the number of sides of the die A method, rollDie), returns the face value when the die is rolled. Use a Random number to "roll" the die. Write a driver program. This program should create two die with the same number of sides, continually roll the dice and report the result of each roll. It should stop when "snake eyes" are rolled (double 1's) and report the number of rolls. You may write this as a console application or a Windows Forms application. Here's an example: Form1 Roll Dice

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!