static void Main(string[] args) { MenuComponent pancakeHouseMenu = new Menu("MENU PANCAKE HOUSE", "Breakfast"); pancakeHouseMenu.Add(new MenuPosition("Pancake with eggs", "Pancake with scrumbled eggs and toast", true, 2.99)); pancakeHouseMenu.Add(new MenuPosition("Normal pancake", "Pancake with sausages", false, 5.99)); MenuComponent dessertsMenu = new Menu("DESSERTS MENU", "Desserts, ofcourse!"); dessertsMenu.Add(new MenuPosition("Cake", "Cake with vanilia ice cream", true, 1.59)); MenuComponent dinnerMenu = new Menu("DINNER MENU", "Lunch"); dinnerMenu.Add(new MenuPosition("Vege Sandwitch", "Sandwitch with cucumber, tomato and cheese", true, 1.99)); dinnerMenu.Add(new MenuPosition("Normal Sandwitch", "Sandwitch with ham and tomato", true, 2.49)); dinnerMenu.Add(dessertsMenu); MenuComponent allMenus = new Menu("ALL MENUS", "All menus"); allMenus.Add(pancakeHouseMenu); allMenus.Add(dinnerMenu); Waitress waitress = new Waitress(allMenus); waitress.Print(); }
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 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", 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", "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("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 ice cream", true, 1.59)); 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)); Waitress waitress = new Waitress(allMenus); //waitress.PrintMenu(); waitress.PrintVegetarianMenu(); Console.Read(); }
static void Main(string[] args) { var menu1 = new Menu("Pancake menu", "Breakfast"); var menu2 = new Menu("Dinner menu", "Lunch"); var menu3 = new Menu("Cafe", "Dinner"); var menu4 = new Menu("Desert menu", "Desert"); var allMenus = new Menu("All menus", "All menus Combined"); allMenus.Add(menu1); allMenus.Add(menu2); allMenus.Add(menu3); menu2.Add(menu4); var waitress = new Waitress(allMenus); waitress.PrintMenu(); Console.ReadKey(); }
static void Main(string[] args) { MenuComponent pancakeMenu = new Menu("Pancake Menu", " - morning menu"); MenuComponent dinerMenu = new Menu("Diner Menu", " - diner menu"); MenuComponent cafeMenu = new Menu("Cafe Menu", " - every time"); MenuComponent allMenus = new Menu("All Menu", " - all menu"); allMenus.add(pancakeMenu); allMenus.add(dinerMenu); allMenus.add(cafeMenu); dinerMenu.add(new MenuItem("BLT", "bacon, lettuce, tomato", false, 3.89)); pancakeMenu.add(new MenuItem("Apple pancake", "Apple", true, 1.59)); cafeMenu.add(new MenuItem("Coffee", "Coffee", false, 0.99)); Waitress waitress = new Waitress(allMenus); waitress.printMenu(); }
static void Main(string[] args) { var menu1 = new Menu("Pancake menu", "Breakfast"); var menu2 = new Menu("Dinner menu", "Lunch"); var menu3 = new Menu("Cafe", "Dinner"); var menu4 = new Menu("Desert menu", "Desert"); var allMenus = new Menu("All menus", "All menus Combined"); allMenus.Add(menu1); allMenus.Add(menu2); allMenus.Add(menu3); menu2.Add(menu4); var waitress = new Waitress(allMenus); waitress.PrintMenu(); Console.ReadKey(); }
static void Main(string[] args) { // var pancakeHouseMenu = new Menu("PANCAKE HOUSE MENU", "Breakfast"); // var dinerMenu = new Menu("DINER MENU","Lunch"); // var cafeMenu = new Menu("CAFE MENU","Dinner"); // var dessertMenu = new Menu("DESSERT MENU","Desserts of course!"); // // var composite = new Menu("ALL MENUS","All menus combined"); // // composite.Add(pancakeHouseMenu); // composite.Add(dinerMenu); // composite.Add(cafeMenu); // // pancakeHouseMenu.Add(new MenuItem("Bacon Pancake","Meaty",9.55,false)); // pancakeHouseMenu.Add(new MenuItem("Apple Pancake", "Fruity", 7.55, true)); // dinerMenu.Add(new MenuItem("Omelette","Eggs PLS",12.5,true)); // cafeMenu.Add(new MenuItem("T-Bone Steak","With patatoes",15.99,false)); // cafeMenu.Add(dessertMenu); // dessertMenu.Add(new MenuItem("Dame Blanche","Sweet and Tasty",7.45,true)); // // var waitress = new Waitress(composite); // // waitress.PrintMenu(); // waitress.PrintVegetarianMenu(); var compositeTest = new Menu("composite", "composite menu"); // var leaf = new MenuItem("leaf","leaf",10,true); var compositeNode = new Menu("Node", "Node"); compositeNode.Add(new MenuItem("Leaf", "Leaf", 10, true)); compositeTest.Add(compositeNode); // compositeTest.Add(leaf); var nodeWaitress = new Waitress(compositeTest); nodeWaitress.PrintAllExternal(); Console.WriteLine("\n\nINTERNAL PRINT"); nodeWaitress.PrintMenu(); }
static void Main(string[] args) { MenuComponent allMenu = new Menu("All Menu", "This is the whole menu!"); MenuComponent pancakeHouseMenu = new Menu("PANCAKE HOUSE MENU","Breakfast"); MenuComponent dinnerMenu = new Menu("DINNER MENU","Lunch"); MenuComponent cafeMenu = new Menu("CAFE MENU","Dinner"); MenuComponent dessertMenu = new Menu("DESSERT MENU","Dessert of course"); allMenu.Add(pancakeHouseMenu); allMenu.Add(dinnerMenu); allMenu.Add(cafeMenu); //breakfast menu 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, and 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", true, 3.59)); //dinner menu dinnerMenu.Add(new MenuItem("Vegetarian BLT", "(Fakin') Bacon with lettuce & tomato on whole wheat", true, 2.99)); dinnerMenu.Add(new MenuItem("Soup of the day", "Soup of the day, with a side of potato salad", false, 3.29)); dinnerMenu.Add(new MenuItem("Hotdog", "A hot dog with saurkraut, relish, onions, topped with cheese", false, 3.05)); dinnerMenu.Add(new MenuItem("Steamed Veggies and Brown Rice", "Steamed vegetables over brown rice", true, 3.99)); //cafe menu 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)); //add the dessert as a child node off the dinner menu dinnerMenu.Add(dessertMenu); //dinner menu dessertMenu.Add(new MenuItem("Apple Pie", "Apple pie with a flakey crust, topped with vanilla icecream", true, 1.59)); dessertMenu.Add(new MenuItem("Chocolate Cake", "Creamy chololate cake with caramel icing", true, 2.59)); dessertMenu.Add(new MenuItem("Icecream Pie", "Icecream pie with crunchy crust", true, 1.50)); Waitress waitress = new Waitress(allMenu); waitress.PrintAllMenuItem(); }