Пример #1
0
 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;
 }
Пример #2
0
        public bool AddDessertsToDirectory(Dessert dessert)
        {
            int initialCount = _desserts.Count;

            _desserts.Add(dessert);
            bool addedItem = _desserts.Count > initialCount;

            return(addedItem);
        }
Пример #3
0
        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);
        }
Пример #4
0
 public decimal MealPrice(Entree entree, Side side, Dessert dessert)
 {
     return(entree.Price + side.Price + dessert.Price);
 }
Пример #5
0
        public bool DeleteDesserts(string dessertName)
        {
            Dessert dessertToDelete = GetDessertsByName(dessertName);

            return(_desserts.Remove(dessertToDelete));
        }