Exemplo n.º 1
0
        public static void RevisaoPOO1()
        {
            Duck        duck        = new Duck();
            MallardDuck mallardDuck = new MallardDuck();
            RubberDuck  rubberDuck  = new RubberDuck();
            RedHeadDuck redHeadDuck = new RedHeadDuck();

            duck.display();
            duck.swim();

            mallardDuck.display();
            mallardDuck.quack();
            mallardDuck.fly();

            rubberDuck.display();
            rubberDuck.quack();

            redHeadDuck.display();
            redHeadDuck.fly();
            redHeadDuck.quack();
        }