示例#1
0
        static void Main(string[] args)
        {
            SalariedEmployee emp1 = new SalariedEmployee("Nik", "Bennet", "1234549028"
                                                         , 500.00m);

            Console.WriteLine(emp1.ToString());
            Console.WriteLine("Hello Worlds");
        }
        static void Main(string[] args)
        {
            Employee salariedEmployee           = new SalariedEmployee("Alice", "Cooper", "123456789", 1000);
            Employee hourlyEmployee             = new HourlyEmployee("Bob", "Dilan", "987654321", 20, 40);
            Employee commissionEmployee         = new CommissionEmployee("Patrick", "Frost", "135798462", 500, 0.2);
            Employee basePlusCommissionEmployee = new BasePlusCommissionEmployee("Kristine", "Chen", "095478236", 600, 0.3, 300);

            Console.WriteLine(salariedEmployee.ToString());
            Console.WriteLine(hourlyEmployee.ToString());
            Console.WriteLine(commissionEmployee.ToString());
            Console.WriteLine(basePlusCommissionEmployee.ToString());

            Console.Read();
        }