Example #1
0
        public void ReadDuckMenu(IIterator iterator)
        {
            int Item = 1;

            while (iterator.hasNext())
            {
                Console.WriteLine("Элемент меню: " + Item);
                IBaseDuck baseDuck = (IBaseDuck)iterator.next();
                baseDuck.Fly();
                baseDuck.Quick();
                baseDuck.Composition();
                Console.WriteLine();
                Item++;
            }
        }
Example #2
0
File: Menu.cs Project: Viruse643/-1
        public void ReadDuckMenu(IIterator iterator)
        {
            int item = 1;

            while (iterator.HasNext())
            {
                Console.WriteLine("Элемент меню: " + item);
                IBaseDuck duck = iterator.Next();

                duck.Fly();
                duck.Quack();
                duck.Walk();

                Console.WriteLine();
                item++;
            }
        }