Esempio n. 1
0
        static void Main(string[] args)
        {
            Cachorro dog   = new Cachorro("Pitoco", 3);
            Cavalo   horse = new Cavalo("Trovão", 6);
            Gato     cat   = new Gato("Sheik", 1);

            Veterinario vet = new Veterinario();

            System.Console.WriteLine(dog.EmitirSom());
            System.Console.WriteLine(horse.EmitirSom());
            System.Console.WriteLine(cat.EmitirSom());

            vet.Examinar(dog);
            vet.Examinar(horse);
            vet.Examinar(cat);
        }
Esempio n. 2
0
 public void Examinar(Cavalo c)
 {
     System.Console.WriteLine($"Examinando o {c.GetNome()}...");
     System.Threading.Thread.Sleep(1000);
     System.Console.WriteLine($"{c.EmitirSom()}\n");
 }