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); }
public void Examinar(Cavalo c) { System.Console.WriteLine($"Examinando o {c.GetNome()}..."); System.Threading.Thread.Sleep(1000); System.Console.WriteLine($"{c.EmitirSom()}\n"); }