|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectfoodManagement.Restaurant
public class Restaurant
The Restaurant has a name (String), a menu (list of Entrees), an inventory (list of Food), and an amount of cash on hand, measured in pennies (int) This class facilitates orders being placed, deliveries being made to the inventory, and entrees being added to the menu.
Constructor Summary | |
---|---|
Restaurant(java.lang.String nameIn,
int startingCash)
Standard constructor. |
Method Summary | |
---|---|
void |
addEntree(Entree entreeToAdd)
Adds an entree to the menu. |
boolean |
addShipmentToInventory(SortedListOfImmutables list)
Adds the specified list of food items to the inventory. |
boolean |
checkIfInInventory(Entree entree)
Checks if the Food items contained in the specified Entree are actually contained in the restaurant's inventory. |
int |
getCash()
Getter for the current amount of cash on hand |
SortedListOfImmutables |
getInventory()
Getter for the inventory. |
SortedListOfImmutables |
getMenu()
Getter for the menu. |
java.lang.String |
getName()
Getter for the name of the restaurant. |
boolean |
placeOrder(Entree entree)
Removes the food items contained in the specified Entree from the inventory. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Restaurant(java.lang.String nameIn, int startingCash)
nameIn
- name of the restaurantstartingCash
- cash amount that the restaurant will have, measured
in penniesMethod Detail |
---|
public java.lang.String getName()
public SortedListOfImmutables getMenu()
public void addEntree(Entree entreeToAdd)
entreeToAdd
- reference to the entree to be added to the menupublic SortedListOfImmutables getInventory()
public int getCash()
public boolean checkIfInInventory(Entree entree)
entree
- Entree that we are checking against the inventory
public boolean addShipmentToInventory(SortedListOfImmutables list)
list
- food items to be added to the inventory
public boolean placeOrder(Entree entree)
entree
- Entree that has been ordered
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |