static void Main(string[] args) { Employee e1 = new Manager("abc", "sanjyot", 15000, 2); Manager e2 = new GeneralManager(); Employee e3 = new CEO("abc", "sanjyot", 18000, 2); Console.WriteLine(e1.calcNetSalary()); Console.WriteLine(e2.calcNetSalary()); Console.WriteLine(e3.calcNetSalary()); Console.ReadLine(); }
static void Main(string[] args) { //Employee o1 = new Employee("Shubham", 10, 10000); Manager o1 = new Manager("Shubham", 2, 12000, "Sen.Managaer"); Console.WriteLine(o1); Console.WriteLine(o1.EmpNo); Console.WriteLine(o1.CalcNetSalary()); Console.ReadLine(); CEO o2 = new CEO("ABC", 4, 25000); Console.WriteLine(o2.EmpNo); Console.WriteLine(o2.CalcNetSalary()); Console.ReadLine(); Employee o3 = new GeneralManager("Nikam", 3, 15000, "Gen Manager", "None"); Console.WriteLine(o3); Console.WriteLine(o3.EmpNo); Console.WriteLine(o3.CalcNetSalary()); }