static void Main(string[] args) { Animal cat = new Cat("Pesho", "Whiskas"); Animal dog = new Dog("Gosho", "Meat"); Console.WriteLine(cat.ExplainSelf()); Console.WriteLine(dog.ExplainSelf()); }
public static void Main() { string name = Console.ReadLine(); string favouriteFood = Console.ReadLine(); var cat = new Cat(name, favouriteFood); name = Console.ReadLine(); favouriteFood = Console.ReadLine(); var dog = new Dog(name, favouriteFood); Console.WriteLine(cat.ExplainSelf()); Console.WriteLine(dog.ExplainSelf()); }