Ejemplo n.º 1
0
        public static void Main()
        {
            Bird animal = new Bird();

            animal.ShowType();
            Chicken chicken = new Chicken();

            chicken.Eat();
            chicken.ShowColor();
            chicken.ShowType();

            Bird bird = new Chicken();

            bird.ShowType();
            Console.WriteLine(bird.type);

            ChickenAdapter ca = new ChickenAdapter();

            ca.ToTweet();

            BirdAdapter ba = new BirdAdapter(new Chicken());

            ba.ShowType();
            ba.ToTweet();

            Console.Read();
        }
Ejemplo n.º 2
0
        public static void Main()
        {
            Bird animal = new Bird();
            animal.ShowType();
            Chicken chicken = new Chicken();
            chicken.Eat();
            chicken.ShowColor();
            chicken.ShowType();

            Bird bird = new Chicken();
            bird.ShowType();
            Console.WriteLine(bird.type);

            ChickenAdapter ca = new ChickenAdapter();
            ca.ToTweet();

            BirdAdapter ba = new BirdAdapter(new Chicken());
            ba.ShowType();
            ba.ToTweet();

            Console.Read();
        }