Exemplo n.º 1
0
 public void addItem(string name, string desc, bool veget, double price)
 {
     MenuItem item = new MenuItem(name,desc,veget, price);
     if (numberOfItems >= MAX_ITEMS)
     {
         Console.WriteLine("Menu is full!");
     }
     else
     {
         menuItems[numberOfItems] = item;
         numberOfItems += 1;
     }
 }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            Menu pancakeHouseMenu = new Menu("PANCAKE HOUSE MENU", "Breakfast");
            Menu dinerMenu = new Menu("DINER MENU", "Lunch");
            Menu cafeMenu = new Menu("CAFE MENU", "Dinner");
            Menu dessertMenu = new Menu("DESSERT MENU", "Dessert of course! ");
            Menu allMenus = new Menu("ALL MENUS", "All menus combined");

            MenuItem item = new MenuItem("Pancake", "Plain", true, 1.99);
            pancakeHouseMenu.Add(item);

            allMenus.Add(pancakeHouseMenu);
            cafeMenu.Add(dinerMenu);
            allMenus.Add(cafeMenu);

            Waitress shirley = new Waitress(allMenus);
            shirley.PrintMenu();
            Console.ReadLine();
        }
Exemplo n.º 3
0
 public DinerMenuIterator(MenuItem[] items)
 {
     this.items = items;
 }