/** * Write a description of class Die here. * * @author Gerald Gordon * @version March 15, 2004 */ public class Die { //The smallest number a die can have private final int MIN_NUMBER = 1; //The largest number a die can have private final int MAX_NUMBER = 6; //The initialization of the die when created private final int NO_NUMBER = 0; //the current value of the die private int number; public Die() { number = NO_NUMBER; } //this procedure rolls the die public void roll() { number = (int) Math.floor(Math.random()*(MAX_NUMBER - MIN_NUMBER + 1)) +1; } public int getNumber() { return number; } }