Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            IDuck duck = new WildDuck();

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

            ITurkey turkey = new Turkey();

            turkey.Gobble();
            turkey.Fly();

            TurkeyAdapter adapter = new TurkeyAdapter(turkey);

            adapter.Quack();
            adapter.Fly();

            Console.ReadKey();
        }
Ejemplo n.º 2
0
 public TurkeyAdapter(Turkey turkey)
 {
     this._Turkey = turkey;
 }