public class GumballMachine extends java.lang.Object
Constructor and Description |
---|
GumballMachine(java.lang.String location,
int count) |
Modifier and Type | Method and Description |
---|---|
void |
ejectQuarter() |
int |
getCount() |
State |
getHasQuarterState() |
java.lang.String |
getLocation() |
State |
getNoQuarterState() |
State |
getSoldOutState() |
State |
getSoldState() |
State |
getState() |
State |
getWinnerState() |
void |
insertQuarter() |
void |
refill(int count) |
java.lang.String |
toString() |
void |
turnCrank() |
public GumballMachine(java.lang.String location, int count)
public void insertQuarter()
public void ejectQuarter()
public void turnCrank()
public int getCount()
public void refill(int count)
public java.lang.String getLocation()
public State getSoldOutState()
public State getNoQuarterState()
public State getHasQuarterState()
public State getSoldState()
public State getWinnerState()
public java.lang.String toString()
toString
in class java.lang.Object