RollDice - } //------------------------------public void...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
/* */ public class Die{ private static final int MAX_NUMBER = 6; private static final int MIN_NUMBER = 1; private static final int NO_NUMBER = 0; private int number; //------------------------------ public Die(){ number = NO_NUMBER;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: } //------------------------------public void Roll(){ number = (int)(Math.floor(Math.random()*(MAX_NUMBER - MIN_NUMBER + 1))); } //------------------------------public int getNumber(){ return number; } }...
View Full Document

This note was uploaded on 05/01/2008 for the course ECE 172 taught by Professor Olabe during the Spring '08 term at Christian Brothers.

Ask a homework question - tutors are online