public static void Main() { Console.WriteLine("===============Employee================="); Employee a1 = new Manager("Employee", "ABC", 10000, 01); a1.DisplayData(); Console.ReadLine(); Console.WriteLine("===============Manager================="); Employee a2 = new Manager("Manager", "Amit", 30000, 11); a2.DisplayData(); Console.ReadLine(); Console.WriteLine("============GenerelManager================="); Employee a3 = new GenerelManager("Derimilk", "general manager", "Mohit", 50000, 12); a3.DisplayData(); Console.ReadLine(); Console.WriteLine("=================CEO================="); CEO a4 = new CEO("Rahul", 80000, 13); a4.DisplayData(); Console.ReadLine(); }
static void Main(string[] args) { Console.WriteLine("Manager"); Manager mg = new Manager("Hello", "MOhit", 11, 17000000); Console.WriteLine(mg.Name + " " + mg.BasicSal); Console.WriteLine("Net sal : " + mg.calcNetSalary()); Console.WriteLine("----------------------------------------"); Console.WriteLine("General Manager"); GeneralManager gmg = new GeneralManager("Hello", "Hello", "MOHIT", 12, 16000000); Console.WriteLine(gmg.Name + " " + gmg.BasicSal); Console.WriteLine("Net sal : " + gmg.calcNetSalary()); Console.WriteLine("----------------------------------------"); Console.WriteLine("CEO"); CEO c = new CEO("MOHIT", 13, 20000000); Console.WriteLine(c.Name + " " + c.BasicSal); Console.WriteLine("Net sal : " + c.calcNetSalary()); Console.WriteLine("----------------------------------------"); IDbFunctions i1 = new Manager(); i1.Delete(); i1.Update(); Console.WriteLine("----------------------------------------"); IDbFunctions i2 = new GeneralManager(); i2.Insert(); Console.WriteLine("----------------------------------------"); IDbFunctions i3 = new CEO(); i3.Delete(); i3.Update(); Console.ReadLine(); }