project4
Class Chef
java.lang.Object
project4.Chef
- Direct Known Subclasses:
- QueueChef, StackChef, ValueChef
public abstract class Chef
- extends java.lang.Object
Constructor Summary |
Chef()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
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
Chef
public Chef()
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