Exemple #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;
 }
Exemple #2
0
        public bool AddDessertsToDirectory(Dessert dessert)
        {
            int initialCount = _desserts.Count;

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

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

            return(_desserts.Remove(dessertToDelete));
        }