Example #1
0
        static void Main(string[] args)
        {
            Employee e1 = new Manager("abc", 3, 2000, "tech-manager");
            Employee e2 = new GeneralManager("xyz", 3, 20000, "bhaiya ji", "CEO");
            Employee e3 = new CEO("Aditya", 5, 1000);

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

            Console.WriteLine(e1.CalcNetSalary());
            Console.WriteLine(e1.EmpNo);
            Console.WriteLine(e2.EmpNo);
            Console.WriteLine(e3.EmpNo);
            Console.ReadLine();
        }
Example #2
0
        public static void Main(string[] args)
        {
            SoftwareDeveloper developer = new SoftwareDeveloper("Bob", "C#", 500);

            developer.Salary    = 50000;
            developer.StartDate = new DateTime(2018, 10, 1);
            developer.PrintInformation();

            CEO ceo = new CEO("Fred", 100000);

            ceo.Salary = 10000000;
            ceo.PrintInformation();

            Console.ReadKey();
        }