Esempio n. 1
0
        static void Main(string[] args)
        {
            MallardDuck myDuck   = new MallardDuck();
            WildTurkey  myTurkey = new WildTurkey();

            Duck TurkeyAdapter = new TurkeyAdapter(myTurkey);

            myTurkey.gobble();
            myTurkey.fly();
            myDuck.quack();
            myDuck.fly();

            testduck(TurkeyAdapter);
            Console.ReadLine();
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            MallardDuck myDuck = new MallardDuck();
            WildTurkey myTurkey = new WildTurkey();

            Duck TurkeyAdapter = new TurkeyAdapter(myTurkey);

            myTurkey.gobble();
            myTurkey.fly();
            myDuck.quack();
            myDuck.fly();

            testduck(TurkeyAdapter);
            Console.ReadLine();
        }