public Waitress(Menu phMenu, Menu dMenu) { this.phMenu = phMenu; this.dMenu = dMenu; }
static void Main(string[] args) { MenuComponent allMenus = new Menu("All Menus", "All Menus combined"); MenuComponent phMenu = new Menu("Pancake Menu", "Breakfast"); MenuComponent dMenu = new Menu("Dinner Menu", "Dinner"); MenuComponent dessert = new Menu("Dessert Menu","Dessert"); allMenus.Add(phMenu); allMenus.Add(dMenu); phMenu.Add(new MenuItem("dinner 1", 3.00)); //adding a menuitem to breakfast dMenu.Add(dessert); //Adding a SubMenu to a Menu dessert.Add(new MenuItem("dessert 1", 4.00)); Waitress w = new Waitress(allMenus); w.printMenu(); string z = Console.ReadLine(); }