public static void Main(string[] args) { BabyDog d1 = new BabyDog(); d1.eat(); d1.bark(); d1.weep(); }
public static void Main(string[] args) { Console.WriteLine("Single Level Inheritance ............."); Programmer p1 = new Programmer(); Console.WriteLine("Salary: " + p1.salary); Console.WriteLine("Bonus: " + p1.bonus); Console.WriteLine("----------------------------------------------"); Console.WriteLine("Muliple Level Inheritace ....................."); BabyDog d1 = new BabyDog(); d1.eat(); d1.bark(); d1.weep(); }