public MenuItems(int mealNum, string mealName, string mealDesc, Entree main, Side sides, Dessert desserts) { MealNum = mealNum; MealName = mealName; MealDesc = mealDesc; Main = main; Sides = sides; Desserts = desserts; }
public bool AddDessertsToDirectory(Dessert dessert) { int initialCount = _desserts.Count; _desserts.Add(dessert); bool addedItem = _desserts.Count > initialCount; return(addedItem); }
public bool UpdateExistingDessert(string originalName, Dessert newContent) { Dessert oldContent = GetDessertsByName(originalName); if (oldContent != null) { oldContent.Name = newContent.Name; oldContent.Description = newContent.Description; oldContent.Price = newContent.Price; oldContent.DessertBase = newContent.DessertBase; oldContent.Topping = newContent.Topping; oldContent.Topping2 = newContent.Topping2; return(true); } return(false); }
public decimal MealPrice(Entree entree, Side side, Dessert dessert) { return(entree.Price + side.Price + dessert.Price); }
public bool DeleteDesserts(string dessertName) { Dessert dessertToDelete = GetDessertsByName(dessertName); return(_desserts.Remove(dessertToDelete)); }