Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            /* on C# is not needed an iterator implementation for collection. They already implements
             * this pattern. Program writen is only for learning purposes*/
            PancakeHouseMenu pancakeHouseMenu = new PancakeHouseMenu();
            DinerMenu        dinerMenu        = new DinerMenu();
            Waitress         waitress         = new Waitress(pancakeHouseMenu, dinerMenu);

            waitress.PrintMenu();
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            PancakeHouseMenu pancakeHouseMenu = new PancakeHouseMenu();
            DinnerMenu       dinnerMenu       = new DinnerMenu();
            AtJackMenu       atJackMenu       = new AtJackMenu();

            Waitress waitres = new Waitress(pancakeHouseMenu, dinnerMenu, atJackMenu);

            waitres.PrintMenu();
            Console.ReadKey();
        }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            PancakeHouseMenu pancakeHouseMenu = new PancakeHouseMenu();
            DinerMenu        dinerMenu        = new DinerMenu();

            Waitress waitress = new Waitress(pancakeHouseMenu, dinerMenu);

            waitress.PrintMenu();
            PrintMenu();
            Console.ReadLine();
        }
Ejemplo n.º 4
0
        static void Main(string[] args)
        {
            IEnumerable <IMenu> menus = new List <IMenu>()
            {
                new PancakeHouseMenu(),
                new DinerMenu(),
                new CafeMenu()
            };
            var waitress = new Waitress(menus);

            waitress.PrintMenu();
        }
Ejemplo n.º 5
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();
        }
Ejemplo n.º 6
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();
        }