예제 #1
0
        void Start()
        {
            var diner = new DinerMenu();
            var lunch = new LunchMenu();

            _PrintMenus(diner);
            _PrintMenus(lunch);
        }
예제 #2
0
        static void Main(string[] args)
        {
            var dinnerMenu = new DinnerMenu();
            var lunchMenu  = new LunchMenu();

            var menuIterators = new List <IEnumerator <Dish> >();

            menuIterators.Add(dinnerMenu.CreateIterator());
            menuIterators.Add(lunchMenu.CreateIterator());

            var waitress = new Waitress(menuIterators);

            waitress.printMenuItems();
        }