Question: Final Test-Requires Resp ft: 1:06:22 Ashley Arrant: Attempt 1 Question 3 d5 points): Consider the following Die class // Represents one die with faces showing
Final Test-Requires Resp ft: 1:06:22 Ashley Arrant: Attempt 1 Question 3 d5 points): Consider the following Die class // Represents one die with faces showing values between 1 and 6. public class Die private final int MAX = 6; // maximum face value private int faceValue: // current value showing on the die // Constructor to set the initial face value. public Die ) f facevalue-1; // Roll the die and return the result (face value). public void roll )f facevalue (int) (Math.random ( ) MAX) +1; = * // Set the face value to a specife value between i and 6. public void setFaceValue (int value) faceValue value: //Recurn the current face value. public int getFaceValue ) return faceValue: // Return a string representation of the die. public String toString )f String result- Integer.tostring (faceValue); return result Given class Die above, complete the test program below (next page) to create a D
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
