public class GumballMachine extends java.lang.Object
Constructor and Description |
---|
GumballMachine(int numberGumballs) |
Modifier and Type | Method and Description |
---|---|
void |
ejectQuarter() |
State |
getHasQuarterState() |
State |
getNoQuarterState() |
State |
getSoldOutState() |
State |
getSoldState() |
State |
getState() |
State |
getWinnerState() |
void |
insertQuarter() |
java.lang.String |
toString() |
void |
turnCrank() |
public GumballMachine(int numberGumballs)
public void insertQuarter()
public void ejectQuarter()
public void turnCrank()
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