import javabook.*; class Die { private int valueOnTop; // value on the top of the die private int edgeLength; // length of an edge when drawing die /** * Basic constructor */ public Die() { valueOnTop = 1; edgeLength = 100; } /** * @param val The initial value on top of the die. * @param length The length of an edge in pixels. */ public Die( int val, int length ) { // stub } /** * Sets the current value of the die. * @param newValue The new top value for the die. */ public void setValue( int newValue ) { // stub } /** * Sets the value to a random integer between 1 and 6. */ public void roll() { // stub } /** * Returns the value on top of the die. * @return The top value. */ public int onTop() { // stub } /** * Draws the die on a canvas. Specifically, draws a square where each * side has a length of edgeLength, then draws the appropriate pips * as circles in the right portion. */ /* Hint: figure out how to draw a pip * in the top left, top right, center, etc., then draw whichever pips * you actually need for a given value on top. */ public void draw() { // stub } }