示例#1
0
文件: LineMan.cs 项目: normalFF/Ducks
        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++;
            }
        }
示例#2
0
文件: Menu.cs 项目: 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++;
            }
        }