Esempio n. 1
0
        static void Main(string[] args)
        {
            Employee e1 = new Manager("Neha", 2, "manager");

            e1.BASIC = 2000;
            e1.Display();
            Console.WriteLine();
            Console.WriteLine("-------------------------------");
            Employee e2 = new GeneralManager("Shweta", 3, "GeneralManager", "xyz");

            e2.BASIC = 40000;
            e2.Display();
            Console.WriteLine();
            Console.WriteLine("-----------------------------------");

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

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

            Console.WriteLine("-----------------------------------");
            Employee e4 = new Manager();

            e4.Display();
            Console.WriteLine();
            Console.WriteLine("-------------------------------------");
            Employee e5 = new GeneralManager();

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

            Employee e6 = new CEO();

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

            Console.WriteLine("---------------------------------------");
            Console.ReadLine();
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            Employee e1 = new Manager(basic: 10);
            Employee e2 = new GeneralManager("cdac", "tushar", 11, 50000, "General Manager");
            Employee e3 = new CEO("kishor", basic: 60000);

            //Console.WriteLine(e1.EmpNo+"  "+ e1.calcNetSalary()+"  "+e1.DeptNo + "  "+e1.Name);
            //Console.WriteLine(e2.EmpNo+"  "+e2.calcNetSalary()+"  "+e2.DeptNo+"  "+e2.Name);
            //Console.WriteLine(e3.EmpNo+"  "+e3.calcNetSalary()+"  "+e3.DeptNo+"  "+e3.Name);

            e1.Display();
            Console.WriteLine();
            e2.Display();
            Console.WriteLine();
            e3.Display();

            Console.WriteLine();

            Console.WriteLine(e3.EmpNo);
            Console.WriteLine(e2.EmpNo);
            Console.WriteLine(e1.EmpNo);

            Console.ReadLine();
        }