Beispiel #1
0
        public void DisplayMenu(IInventoryControl inventoryControl)
        {
            Console.WriteLine("Menu:");

            foreach (var _menuDrink in _menuDrinks)
            {
                Console.WriteLine("{0},{1},{2},{3}", _menuDrink.Key, _menuDrink.Value.DrinkName, _menuDrink.Value.DrinkCost, inventoryControl.CheckLevels(_menuDrink.Value));
            }

            Console.WriteLine();
        }
 public void MakeDrink(Drink drink, IInventoryControl inventoryControl)
 {
     if(inventoryControl.CheckLevels(drink))
     {
         Console.WriteLine("\nDispensing: {0}\n", drink.DrinkName);
         inventoryControl.AdjustInventory(drink);
     }
     else {
         Console.WriteLine("\nOut of Stock: {0}\n", drink.DrinkName);
     }
 }