public class GumballMachine extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) int |
count |
(package private) static int |
HAS_QUARTER |
(package private) static int |
NO_QUARTER |
(package private) static int |
SOLD |
(package private) static int |
SOLD_OUT |
(package private) int |
state |
Constructor and Description |
---|
GumballMachine(int count) |
Modifier and Type | Method and Description |
---|---|
void |
dispense() |
void |
ejectQuarter() |
void |
insertQuarter() |
void |
refill(int numGumBalls) |
java.lang.String |
toString() |
void |
turnCrank() |
static final int SOLD_OUT
static final int NO_QUARTER
static final int HAS_QUARTER
static final int SOLD
int state
int count
public GumballMachine(int count)
public void insertQuarter()
public void ejectQuarter()
public void turnCrank()
public void dispense()
public void refill(int numGumBalls)
public java.lang.String toString()
toString
in class java.lang.Object