static void Main(string[] args)
        {
            PancakeHouseMenu pancakeHouseMenu = new PancakeHouseMenu();
            DinerMenu        dinerMenu        = new DinerMenu();
            CafeMenu         cafeMenu         = new CafeMenu();

            Waitress waitress = new Waitress(new List <IMenu>
            {
                pancakeHouseMenu, dinerMenu, cafeMenu
            });

            waitress.PrintMenu();

            Console.ReadKey();
        }
예제 #2
0
 public Waitress(PancakeHouseMenu pancakeHouseMenu, DinerMenu dinerMenu, CafeMenu cafeMenu)
 {
     this.pancakeHouseMenu = pancakeHouseMenu;
     this.dinerMenu        = dinerMenu;
     this.cafeMenu         = cafeMenu;
 }