|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcandy.GumballMachine
A machine that dispenses gumballs.
Constructor Summary | |
---|---|
GumballMachine()
Build a new Gumball machine with the default number of balls. |
Method Summary | |
---|---|
java.lang.String |
get()
Get a piece of candy. |
boolean |
isEmpty()
Determine if the jar is empty. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public GumballMachine()
Method Detail |
public java.lang.String get() throws CandyMachineException
get
in interface CandyMachine
CandyMachineException
- If unable to return a piece of candy (e.g., if empty).public boolean isEmpty()
isEmpty
in interface CandyMachine
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |