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() |
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 java.lang.String toString()
toString
in class java.lang.Object