Beispiel #1
0
        /*static void testMenuItems_1()
         * {
         *  PancakeHouseMenu pancakeHouseMenu = new PancakeHouseMenu();
         *  List<MenuItem> breakfastItems = pancakeHouseMenu.getMenuItems();
         *
         *  DinerMenu dinerMenu = new DinerMenu();
         *  MenuItem[] lunchItems = dinerMenu.getMenuItems();
         *
         *  for (int i = 0; i < breakfastItems.Count(); i++)
         *  {
         *      MenuItem menuItem = breakfastItems[i];
         *      Console.WriteLine(menuItem.getName()+" ");
         *      Console.WriteLine(menuItem.getPrice() + " ");
         *      Console.WriteLine(menuItem.getDescription() + " ");
         *  }
         *
         *  for (int i = 0; i < lunchItems.Length; i++)
         *  {
         *      if (lunchItems[i] != null)
         *      {
         *          MenuItem menuItem = lunchItems[i];
         *          Console.WriteLine(menuItem.getName() + " ");
         *          Console.WriteLine(menuItem.getPrice() + " ");
         *          Console.WriteLine(menuItem.getDescription() + " ");
         *      }
         *  }
         * }*/

        static void testWaitress()
        {
            PancakeHouseMenu pancakeHouseMenu = new PancakeHouseMenu();
            DinerMenu        dinerMenu        = new DinerMenu();

            Waitress waitress = new Waitress(pancakeHouseMenu, dinerMenu);

            waitress.printMenu();
        }
Beispiel #2
0
 public Waitress(PancakeHouseMenu pancakeHouseMenu, DinerMenu dinerMenu)
 {
     _pancakeHouseMenu = pancakeHouseMenu;
     _dinerMenu        = dinerMenu;
 }