cmsc433.p2
Class Eater

java.lang.Object
  extended by cmsc433.p2.Eater
All Implemented Interfaces:
java.lang.Runnable

public class Eater
extends java.lang.Object
implements java.lang.Runnable

Eaters are simulation actors that have two fields: a name, and a list of Food items that constitue the Eater's order. When running, an eater attempts to enter the restaurant (only successful if the restaurant has a free table), place its order, and then leave the restaurant when the order is complete.


Constructor Summary
Eater(java.lang.String name, java.util.List<Food> order)
          You can feel free modify this constructor.
 
Method Summary
 void run()
          This method defines what an Eater does: The eater attempts to enter the restaurant (only successful if the restaurant has a free table), place its order, and then leave the restaurant when the order is complete.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Eater

public Eater(java.lang.String name,
             java.util.List<Food> order)
You can feel free modify this constructor. It must take at least the name and order but may take other parameters if you would find adding them useful.

Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

run

public void run()
This method defines what an Eater does: The eater attempts to enter the restaurant (only successful if the restaurant has a free table), place its order, and then leave the restaurant when the order is complete.

Specified by:
run in interface java.lang.Runnable