project4
Class Chef

java.lang.Object
  extended by project4.Chef
Direct Known Subclasses:
QueueChef, StackChef, ValueChef

public abstract class Chef
extends java.lang.Object


Field Summary
static int QUEUE_CHEF_TYPE
          Queue, Stack and Value Chef type
static int STACK_CHEF_TYPE
           
static int VALUE_CHEF_TYPE
           
 
Constructor Summary
Chef()
           
 
Method Summary
abstract  Order cookNextOrder(OrderList orderList)
          cook the next order based on the chef's cooking priority and remove that order from the order list
 int getCreditScore()
           
 void setBurgerJoint(BurgerJoint burgerJoint)
          set the burger joint in which this chef works at
 java.lang.String toString()
          overridden version of the toString method
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

QUEUE_CHEF_TYPE

public static final int QUEUE_CHEF_TYPE
Queue, Stack and Value Chef type

See Also:
Constant Field Values

STACK_CHEF_TYPE

public static final int STACK_CHEF_TYPE
See Also:
Constant Field Values

VALUE_CHEF_TYPE

public static final int VALUE_CHEF_TYPE
See Also:
Constant Field Values
Constructor Detail

Chef

public Chef()
Method Detail

cookNextOrder

public abstract Order cookNextOrder(OrderList orderList)
                             throws OrderList.NoOrderException
cook the next order based on the chef's cooking priority and remove that order from the order list

Parameters:
orderList - the order list for the chef to select an order to cook
Returns:
the order which was cooked by the chef
Throws:
OrderList.NoOrderException - throw this when there are no orders in the list to cook

setBurgerJoint

public void setBurgerJoint(BurgerJoint burgerJoint)
set the burger joint in which this chef works at

Parameters:
burgerJoint - the burger joint in which this chef works at

getCreditScore

public int getCreditScore()

toString

public java.lang.String toString()
overridden version of the toString method

Overrides:
toString in class java.lang.Object
Returns:
a String representation of the chef