예제 #1
0
        public static void testar()
        {
            Duck pato = new Duck();

            pato.display();

            Duck patomau = new MallarDuck();

            patomau.display();

            ReadHeadDuck patovermelho = new ReadHeadDuck();

            patovermelho.fly();

            Duck patoborracha = new RubberDuck();

            patoborracha.display();

            Duck patoMadeira = new DuckWood();

            patoMadeira.display();
            patoMadeira.quack();


            Duck patoMetal = new DuckMetal();

            patoMetal.display();
            patoMetal.quack();
        }
예제 #2
0
        public static void testar()
        {
            Duck pato = new Duck();

            pato.display();

            Duck patomau = new MallarDuck();

            patomau.display();

            ReadHeadDuck patovermelho = new ReadHeadDuck();

            patovermelho.fly();

            Duck patoborracha = new RubberDuck();

            patoborracha.display();
        }