Beispiel #1
0
        static void Main(string[] args)
        {
            Manager e = new Manager("Manager", "mgr", 53000, 1);

            Console.WriteLine("Empid: " + e.EMPNO + ", Designation: " + e.DESIGNATION + ", Name: " + e.NAME + ", Basic salary: " + e.BASIC + ", Dept No: " + e.DEPTNO);
            e.Insert();
            e.Update();
            e.Delete();
            System.Console.ReadLine();

            GeneralManager m = new GeneralManager("", "General", "GM", 25000);

            Console.WriteLine("Empid: " + m.EMPNO + ",Perks: " + m.Perks + ", Designation: " + m.DESIGNATION + ", Name: " + m.NAME + ", Basic salary: " + m.BASIC);
            m.Insert();
            m.Update();
            m.Delete();
            System.Console.ReadLine();

            CEO ceo = new CEO("", 200000);

            Console.WriteLine("Empid: " + ceo.EMPNO + ", Name: " + ceo.NAME + ", Basic salary: " + ceo.BASIC + ", Net salary: " + ceo.CalcNetSalary());
            ceo.Insert();
            ceo.Update();
            ceo.Delete();
            System.Console.ReadLine();

            CEO ceo1 = new CEO("CEO", 1000);

            Console.WriteLine("Empid: " + ceo1.EMPNO + ", Name: " + ceo1.NAME + ", Basic salary: " + ceo1.BASIC + ", Net salary: " + ceo1.CalcNetSalary());
            ceo1.Insert();
            ceo1.Update();
            ceo1.Delete();
            System.Console.ReadLine();
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            Employee e1 = new Manager("Shantanu", 3, "tech manager", 2000);
            Employee e2 = new GeneralManager("Aman", 3, "CEO", "bhaiya ji", 5000);
            Employee e3 = new CEO("Aditya", 5, 100000);

            Console.WriteLine(e3.CalacNetSalary());
            Console.WriteLine(e2.CalacNetSalary());

            Console.WriteLine(e1.CalacNetSalary());

            Console.ReadLine();
        }
Beispiel #3
0
        static void Main(string[] args)
        {
            Employee e1 = new Manager("A", 10, 2000, "tech manager");
            Employee e2 = new GeneralManager("B", 20, 5000, "HR manager", "xyz");
            Employee e3 = new CEO("C", 30, 10000);

            Console.WriteLine(e3.CalacNetSalary()); //50000
            Console.WriteLine(e2.CalacNetSalary()); //15000

            Console.WriteLine(e1.CalacNetSalary()); //4000

            Console.ReadLine();
        }