Question: Rolling a Die Write a non-static class to represent a die. Call the class Die. The Die class should have two private fields _faceValue: Represents

 Rolling a Die Write a non-static class to represent a die.

Rolling a Die Write a non-static class to represent a die. Call the class Die. The Die class should have two private fields _faceValue: Represents the current face value on the Die object numSides: Represents the total number of sides on the Die object The Die class should have two constructors: public Die(): Creates a new Die object with 6 sides public Die(int numSides): Creates a new Die object with numSides sides The Die class should have a method to roll the Die: public void Rolldie(): Sets the faceValue to a random sensible value for this Die object The Die class should have two getter methods for accessing the private fields: public ??? GetFaceValue() public ??? GetNumSides) using System; namespace DieRoller // Create the Die class // and fill it with the required members 11... public class Program public static void Main() Die myDie = new Die()

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!