Class Order
java.lang.Object
csce331.group13.project2.models.Order
Singleton class that stores the current order in memory.
- Author:
- Varish Kongara, William Clymire
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents a meal in an order, which can consist of a combo, side, entrees, drinks, and add-ons. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a new meal to the order.static OrderReturns the singleton instance of the Order class.javafx.collections.ObservableList<Order.Meal> getMeals()Gets the observable list of meals in this order.voidremoveMeal(Order.Meal meal) Removes a meal from the order.
-
Method Details
-
getInstance
Returns the singleton instance of the Order class.- Returns:
- The single Order instance.
-
getMeals
Gets the observable list of meals in this order.- Returns:
- The list of meals.
-
addMeal
public void addMeal(String combo, String side, List<String> entrees, List<String> drinks, List<String> addOns) Adds a new meal to the order.- Parameters:
combo- The combo name.side- The side name.entrees- The list of entree names.drinks- The list of drink names.addOns- The list of add-on names.
-
removeMeal
Removes a meal from the order.- Parameters:
meal- The meal to remove.
-