applet 2
bankBalance
to wager
.
Check that the wager
is less than or equal to bankBalance
and if not have the user reenter the wager
until a valid amount is
entered. After a correct wager
is entered, let the user play a game of
craps. Increase or decrease the bankBalance
by wager
,
as the case may be, and print the new bankBalance
. When bankBalance
becomes zero, print the message "Sorry, you are busted!".