import objectdraw.*; import java.awt.*; /** Include your name, date, and a description of the Die class here. */ public class Die { //---------------------------------------------------------------------- // Constants //---------------------------------------------------------------------- // The default width and height of a Die object private static final int DEFAULT_DIE_SIZE = 30; //---------------------------------------------------------------------- // Instance Variable //---------------------------------------------------------------------- /** * DrawingCanvas in which to paint Die */ private DrawingCanvas canvas; /** * the current roll on the die */ private int currentRoll; /** * Text of the current roll on the die */ private Text currentRollText; /** * Background of the die */ private FilledRect dieBackground; /** * Frame of the die */ private FramedRect dieFrame; //---------------------------------------------------------------------- // Constructor method(s) //---------------------------------------------------------------------- /** * Constructs a die with 6 faces and randomly rolls it */ public Die (double xCoord, double yCoord, DrawingCanvas canvas) { // ADD CODE TO CONSTRUCT A DIE } // end Die //---------------------------------------------------------------------- // Die Methods are definited below //---------------------------------------------------------------------- /* Recall that all methods take the following form: // Comments describing what the method does public methodName ( param1Name, etc.) { code to implement the method which should be indented; } // end methodName -- matching '}' to end the method */ } // end Die