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