public class Machine
extends java.lang.Object
| Constructor and Description |
|---|
Machine(java.lang.String name,
Food food,
int capacity)
The constructor takes at least the name of the machine,
the Food item it makes, and its capacity.
|
public final java.lang.String name
public final Food food
public Machine(java.lang.String name,
Food food,
int capacity)
public void makeFood()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic java.lang.String toString()
toString in class java.lang.Object