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

            Waitress waitress = new Waitress(pancakeMenu, dinerMenu);

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

            Waitress waitress = new Waitress(pancakeHouseMenu, dinerMenu);

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