public class Pub
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private int |
priceOfPlayingLottery |
private int |
priceOfPlayingOneArmBandit |
private int |
priceOfPlayingScratchCard |
Constructor and Description |
---|
Pub() |
Modifier and Type | Method and Description |
---|---|
int |
getPriceOfPlayingLottery() |
int |
getPriceOfPlayingOneArmBandit() |
int |
getPriceOfPlayingScratchCard() |
int |
playLottery(int number1,
int number2,
int number3) |
int[] |
playOneArmBandit() |
int |
playScratchcard() |
private int priceOfPlayingLottery
private int priceOfPlayingScratchCard
private int priceOfPlayingOneArmBandit
public int getPriceOfPlayingLottery()
public int getPriceOfPlayingScratchCard()
public int getPriceOfPlayingOneArmBandit()
public int playLottery(int number1, int number2, int number3) throws java.lang.Exception
number1
- the first number in the lottery, should be between 1 and 20 inclusivenumber2
- the second number in the lottery, should be between 1 and 20 inclusivenumber3
- the third number in the lottery, should be between 1 and 20 inclusivejava.lang.Exception
- Throws an exception if any 2 numbers passed to it are the same or if any number is below 1 ore greater than 20public int playScratchcard()
public int[] playOneArmBandit()