예제 #1
0
        static void RunTest()
        {
            PancakeHouseMenu pancakeMenu = new PancakeHouseMenu();
            DinerMenu        dinerMenu   = new DinerMenu();

            Waitress waitress = new Waitress(pancakeMenu, dinerMenu);

            waitress.PrintMenu();
        }
예제 #2
0
        static void Main(string[] args)
        {
            PancakeHouseMenu pancakeHouseMenu = new PancakeHouseMenu();
            DinerMenu        dinerMenu        = new DinerMenu();

            Waitress waitress = new Waitress(pancakeHouseMenu, dinerMenu);

            waitress.PrintMenu();
        }
예제 #3
0
        public static void Main(string[] args)
        {
            PancakeHouseMenu pancakeHouseMenu = new PancakeHouseMenu();
            DinerMenu        dinerMenu        = new DinerMenu();

            Waitress waitress = new Waitress(pancakeHouseMenu, dinerMenu);

            // Without iterators
            //printMenu();

            // With iterators
            waitress.PrintMenu();
        }
        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();
        }
예제 #5
0
 public Waitress(PancakeHouseMenu pancakeHouseMenu, DinerMenu dinerMenu, CafeMenu cafeMenu)
 {
     this.pancakeHouseMenu = pancakeHouseMenu;
     this.dinerMenu        = dinerMenu;
     this.cafeMenu         = cafeMenu;
 }
예제 #6
0
 public Waitress(PancakeHouseMenu _pancakeHouseMenu, DinerMenu _dinerMenu)
 {
     pancakeHouseMenu = _pancakeHouseMenu;
     dinerMenu        = _dinerMenu;
 }