Exemplo n.º 1
0
        static void Main()
        {
            MenuComponent dinerMenu = new Menu("Awesome diner menu", "Diner");
            dinerMenu.Add(new MenuItem("Fish and chips", "very GB diner", false, 2.78));

            MenuComponent desertMenu = new Menu("Desert menu", "Desert");
            desertMenu.Add(new MenuItem("Sundea ice", "Good icecream", true, 1.60));

            MenuComponent allMenus = new Menu("All menus", "Everything we've got");

            MenuComponent nightMenu = new Menu("Night menu", "Food for the night");
            nightMenu.Add(new MenuItem("Shrimp", "Nice fired shrimps", true, 2.60));

            allMenus.Add(dinerMenu);
            dinerMenu.Add(desertMenu);
            allMenus.Add(nightMenu);

            Waitress w = new Waitress(allMenus);
            w.PrintMenu();

            //DinerMenu dm = new DinerMenu();
            //Waitress w = new Waitress(phm, dm);

            //w.PrintMenu();

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            MenuIngridient panckakeMenu = new Menu("Menu Pancake Hause", "Breakfest");
            MenuIngridient dinerMenu    = new Menu("Menu Diner Restaurant", "Lunch");
            MenuIngridient atJackMenu   = new Menu("Menu at Jack", "Diner");
            MenuIngridient dessertMenu  = new Menu("Menu Dessert Hause", "Dessert");

            MenuIngridient allMenu = new Menu("All Menu", "Connected Menu");

            allMenu.Add(panckakeMenu);
            allMenu.Add(dinerMenu);
            allMenu.Add(atJackMenu);

            dinerMenu.Add(new MenuPosition("Spaghetti", "Makaron spaghetti z sosem marrinara i kromka chleba na zakwasie", true, 3.90));

            dinerMenu.Add(dessertMenu);

            dessertMenu.Add(new MenuPosition("Szarlotka", "Szarlotka z lodami waniliowymi", true, 1.59));

            Waitress waitress = new Waitress(allMenu);

            waitress.PrintMenu();
            waitress.PrintAllVegeterianMenu();

            Console.ReadKey();
        }
Exemplo n.º 3
0
        static void Main(string[] args)
        {
            MenuComponent pancakeHouseMenu = new Menu.Menu("PANCAKE HOUSE MENU", "Breakfast");
            MenuComponent dinerMenu        = new Menu.Menu("DINER MENU", "Lunch");
            MenuComponent cafeMenu         = new Menu.Menu("CAFE MENU", "Dinner");
            MenuComponent dessertMenu      = new Menu.Menu("DESSERT MENU", "Dessert of course!");

            MenuComponent allMenus = new Menu.Menu("ALL MENUS", "All menus combined");

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

            dinerMenu.Add(new MenuItem("Pasta", "Spaghetti with Marinara Sauce and a slice of sourdough bread", true, 3.89));
            dinerMenu.Add(new MenuItem("Vegetarian BLT", "(Fakin') Bacon with lettuce & tomato on whole wheat", true, 2.99));
            dinerMenu.Add(new MenuItem("BLT", "Bacon with lettuce & tomato on whole wheat", false, 2.99));
            dinerMenu.Add(new MenuItem("Soup of the day", "Soup of the day with a side of potato salad", false, 3.29));
            dinerMenu.Add(new MenuItem("Hotdog", "A hot dog with saurkraut, relish, onions, topped with cheese", false, 3.05));
            dinerMenu.Add(new MenuItem("Steamed Veggies and Brown Rice", "Steamed vegetables over brown rice", true, 3.99));
            dinerMenu.Add(dessertMenu);

            cafeMenu.Add(new MenuItem("Soup of the day", "A cup pf the soup of the day with a side salad", false, 3.69));
            cafeMenu.Add(new MenuItem("Burrito", "A large burrito with whole pinto beans, salsa, guacamole", false, 4.29));
            cafeMenu.Add(new MenuItem("Veggie burger and air fries", "Veggie burger on a whole wheat bun, lettuce, tomato and fries", true, 3.99));

            pancakeHouseMenu.Add(new MenuItem("K&B's Pancake Breakfast", "Pancakes with scrambled eggs and toast", true, 2.99));
            pancakeHouseMenu.Add(new MenuItem("Regular Pancake Breakfast", "Pancakes with fried eggs, sausage", false, 2.99));
            pancakeHouseMenu.Add(new MenuItem("Blueberry Pancakes", "Pancakes made with fresh blueberries", true, 3.49));
            pancakeHouseMenu.Add(new MenuItem("Waffles", "Waffles, with your choice of blueberries or strawberries", false, 3.59));

            dessertMenu.Add(new MenuItem("Apple Pie", "Apple Pie with a flakey crust topped with vanilla icecream", true, 1.59));

            Waitress waitress = new Waitress(allMenus);

            //waitress.PrintVegetarianMenu();

            waitress.PrintMenu();

            Console.ReadKey();
        }
Exemplo n.º 4
0
        static void Main(string[] args)
        {
            MenuComponent pancakeHouseMenu =
                new Menu("PANCAKE HOUSE MENU", "Breakfast");
            MenuComponent dinerMenu =
                new Menu("DINER MENU", "Lunch");
            MenuComponent cafeMenu =
                new Menu("CAFE MENU", "Dinner");
            MenuComponent dessertMenu =
                new Menu("DESSERT MENU", "Dessert of course!");
            MenuComponent coffeeMenu = new Menu("COFFEE MENU", "Stuff to go with your afternoon coffee");

            MenuComponent allMenus = new Menu("ALL MENUS", "All menus combined");

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

            pancakeHouseMenu.Add(new MenuItem(
                                     "K&B's Pancake Breakfast",
                                     "Pancakes with scrambled eggs, and toast",
                                     true,
                                     2.99));
            pancakeHouseMenu.Add(new MenuItem(
                                     "Regular Pancake Breakfast",
                                     "Pancakes with fried eggs, sausage",
                                     false,
                                     2.99));
            pancakeHouseMenu.Add(new MenuItem(
                                     "Blueberry Pancakes",
                                     "Pancakes made with fresh blueberries, and blueberry syrup",
                                     true,
                                     3.49));
            pancakeHouseMenu.Add(new MenuItem(
                                     "Waffles",
                                     "Waffles, with your choice of blueberries or strawberries",
                                     true,
                                     3.59));

            dinerMenu.Add(new MenuItem(
                              "Vegetarian BLT",
                              "(Fakin') Bacon with lettuce & tomato on whole wheat",
                              true,
                              2.99));
            dinerMenu.Add(new MenuItem(
                              "BLT",
                              "Bacon with lettuce & tomato on whole wheat",
                              false,
                              2.99));
            dinerMenu.Add(new MenuItem(
                              "Soup of the day",
                              "A bowl of the soup of the day, with a side of potato salad",
                              false,
                              3.29));
            dinerMenu.Add(new MenuItem(
                              "Hotdog",
                              "A hot dog, with saurkraut, relish, onions, topped with cheese",
                              false,
                              3.05));
            dinerMenu.Add(new MenuItem(
                              "Steamed Veggies and Brown Rice",
                              "Steamed vegetables over brown rice",
                              true,
                              3.99));

            dinerMenu.Add(new MenuItem(
                              "Pasta",
                              "Spaghetti with Marinara Sauce, and a slice of sourdough bread",
                              true,
                              3.89));

            dinerMenu.Add(dessertMenu);

            dessertMenu.Add(new MenuItem(
                                "Apple Pie",
                                "Apple pie with a flakey crust, topped with vanilla icecream",
                                true,
                                1.59));

            dessertMenu.Add(new MenuItem(
                                "Cheesecake",
                                "Creamy New York cheesecake, with a chocolate graham crust",
                                true,
                                1.99));
            dessertMenu.Add(new MenuItem(
                                "Sorbet",
                                "A scoop of raspberry and a scoop of lime",
                                true,
                                1.89));

            cafeMenu.Add(new MenuItem(
                             "Veggie Burger and Air Fries",
                             "Veggie burger on a whole wheat bun, lettuce, tomato, and fries",
                             true,
                             3.99));
            cafeMenu.Add(new MenuItem(
                             "Soup of the day",
                             "A cup of the soup of the day, with a side salad",
                             false,
                             3.69));
            cafeMenu.Add(new MenuItem(
                             "Burrito",
                             "A large burrito, with whole pinto beans, salsa, guacamole",
                             true,
                             4.29));

            cafeMenu.Add(coffeeMenu);

            coffeeMenu.Add(new MenuItem(
                               "Coffee Cake",
                               "Crumbly cake topped with cinnamon and walnuts",
                               true,
                               1.59));
            coffeeMenu.Add(new MenuItem(
                               "Bagel",
                               "Flavors include sesame, poppyseed, cinnamon raisin, pumpkin",
                               false,
                               0.69));
            coffeeMenu.Add(new MenuItem(
                               "Biscotti",
                               "Three almond or hazelnut biscotti cookies",
                               true,
                               0.89));

            Waitress waitress = new Waitress(allMenus);

            waitress.PrintMenu();
            Console.ReadLine();
        }