Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            Console.WriteLine("======");
            GenralManger m1 = new GenralManger("sir", "ceo", "Suraj", 2, 2500);

            Console.ReadLine();


            Employee e = new Manager("Manager", "mgr", 1, 53000);

            Console.WriteLine("Empid: " + e.EMPNO + ", Name: " + e.NAME + ", Basic salary: " + e.BASIC + ", Dept No: " + e.DEPTNO);
            Console.ReadLine();

            /*
             * Manager m = new GenralManger("GM", "",25000);
             * Console.WriteLine("Empid: " + m.EMPNO + ", Name: " + m.NAME + ", Basic salary: " + m.BASIC);
             * Console.ReadLine();
             */
            Employee ceo = new CEO("", 200000);

            Console.WriteLine("Empid: " + ceo.EMPNO + ", Name: " + ceo.NAME + ", Basic salary: " + ceo.BASIC + ", Net salary: " + ceo.CalNetSalary());
            Console.ReadLine();

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

            Console.WriteLine("Empid: " + ceo1.EMPNO + ", Name: " + ceo1.NAME + ", Basic salary: " + ceo1.BASIC + ", Net salary: " + ceo1.CalNetSalary());
            Console.ReadLine();
        }
        static void Main(string[] args)
        {
            //Employee e = new Employee();


            Employee e1 = new Manager("T", 2, "manager");

            e1.Basic = 2500;
            e1.Display();
            Console.WriteLine();

            Employee e2 = new GeneralManager("neha", 3, "GeneralManager", "xyz");

            e2.Basic = 30000;
            e2.Display();
            Console.WriteLine();

            Employee e3 = new CEO("sweety", 4);

            e3.Basic = 10000000;
            e3.Display();
            Console.WriteLine();


            Employee e4 = new Manager();

            e4.Display();
            Console.WriteLine();

            Employee e5 = new GeneralManager();

            e5.Display();
            Console.WriteLine();


            Employee e6 = new CEO();

            e6.Display();
            Console.WriteLine();


            Console.ReadLine();
        }