{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Coin - -public void Toss num...

Info icon This 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;
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

{[ snackBarMessage ]}