Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            RedMallard a = new RedMallard(); simulate(a);
            Turkey t=new Turkey();
            Duck tb = new TurkeyAdapter(t);
            simulate(tb);

            string z = Console.ReadLine();
        }
Ejemplo 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();
     turkeyadapter.Quack();            turkeyadapter.Fly();
     string z = Console.ReadLine();
 }