Class Order.Meal
java.lang.Object
csce331.group13.project2.models.Order.Meal
- Enclosing class:
Order
Represents a meal in an order, which can consist of a combo, side, entrees,
drinks, and add-ons. Note that drinks and add-ons do not have to be
associated with combos.
- Author:
- Varish Kongara, William Clymire
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Meal
public Meal(String combo, String side, List<String> entrees, List<String> drinks, List<String> addOns) Constructs a Meal with the specified components. Meals can contain a combo (combo type, entrees, and sides), drinks, and/or add-ons.- Parameters:
combo- The combo name (can be null).side- The side name (can be null).entrees- The list of entree names.drinks- The list of drink names.addOns- The list of add-on names.
-
-
Method Details
-
getCombo
-
getSide
-
getEntrees
-
getDrinks
-
getAddOns
-
getTotalPrice
Calculates the total price of this meal by summing up the costs of all components.- Returns:
- The total price of the meal.
-
toString
-