Coin - } //------------------------------public void...

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

View Full Document Right Arrow Icon
public class Coin{ private static final int MAX_NUMBER = 2; private static final int MIN_NUMBER = 1; private static final int NO_NUMBER = 0; private int num; //------------------------------ public Coin(){ num = 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 Toss(){ num = (int)(Math.floor(Math.random()*(MAX_NUMBER - MIN_NUMBER + 1))); } //------------------------------public int getNumber(){ return num; } }...
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