static void Main(string[] args)
        {
            PancakeHouseMenu phMenu2 = new PancakeHouseMenu();
            DinnerMenu dMenu2 = new DinnerMenu();

            ArrayList menus = new ArrayList();
            menus.Add(phMenu2); menus.Add(dMenu2);
            Waitress waitress = new Waitress(menus);
            waitress.printMenu();

            string z = Console.ReadLine();
        }
        static void Main(string[] args)
        {
            PancakeHouseMenu phm = new PancakeHouseMenu();
            ArrayList breakfastItems = phm.getMenuItems();
            DinnerMenu dm = new DinnerMenu();
            MenuItem[] lunchItems = dm.getMenuItems();

            for (int i = 0; i < breakfastItems.Count; i++)
            {
                MenuItem menuItem = (MenuItem)breakfastItems[i];
                Console.WriteLine(menuItem.getName());
            }

            for (int j = 0; j < lunchItems.Length; j++)
            {
                MenuItem menuItem = lunchItems[j];
                Console.WriteLine(menuItem.getName());
            }

            //New 1
            PancakeHouseMenu phMenu2 = new PancakeHouseMenu();
            DinnerMenu dMenu2 = new DinnerMenu();
            Waitress waitress = new Waitress(phMenu2, dMenu2);
            waitress.printMenu();

            //New 2

            string z = Console.ReadLine();
        }
Example #3
0
 public Waitress(PancakeHouseMenu phMenu, DinnerMenu dMenu)
 {
     this.phMenu = phMenu; this.dMenu = dMenu;
 }