Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using java... can someone help me write this program Submission Notes Even though on-campus students will submit the irst page to your GA to assist
Using java... can someone help me write this program
Submission Notes Even though on-campus students will submit the irst page to your GA to assist in atendance/grading everyone must submit tlies to Web-CAT for grading Those fles are: 1. Die. java 2. Bunco java 3. Playbunco.java First, create a Die class You will implement a class called Die that has three pieces of data associated with it MIN FACES die, value should be 4, and it should be public a constant whole number that is static and represents the minimum number of sides for a 2 nunFaces -number of sides on the die, private faceValue -current value showing on the die, private You should write the folowing methods: 1, a default constructor that initializes the nunFaces to 6 and EaceValue to 1 2. an overloaded constructor that takes 1 parameter: an integer for the number of sides on the die: it the parameter is greater than or equal to MIN FACES then the parameter should be assigned to numFaces , otherwise it should defauilt to 6. faceValue should be initialized to 1 getNunFaces accessor method: public, no parameter, returns the value for nunFaces getfaceValue 3. 4. 5. setNunFaces mutator method: public, one integer parameter that is for the number of sides of the die; accessor method: public, no parameter, returns the value for facevalue r it is greater than O and less than or equal to MIN FACEs then numPaces is assigned the value; also ensure that facevalue mutator method; public, one integer parameter that is for the face value of the die; if in is still a legal value. 6. setFaceValue is greater than O and less than or oqual to numFaces 7. then facevalue is assigned the value. method: public, takes no parameter and returns the value of roll random value between 1 and numFaces equals facevalue which is set to a 8. method: public, takes one parameter of type Die and returns a boolean that is true if the number of sides and face values are equal tostring method; public, no parameter and returns a String that contains the die information in the ollowing format: Die has XX sides and current value is YY Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started