コード例 #1
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();
        }
コード例 #2
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();
        }