示例#1
0
        public static void Main(string[] args)
        {
            var salaryCalculator = new SalaryCalculator();//invoker

            salaryCalculator.AddSalaryCalculator(new JrSoftwareEngineerSalaryCalculator());
            salaryCalculator.CalculateSalary();


            salaryCalculator.AddSalaryCalculator(new ProjectManagerSalaryCalculator());
            salaryCalculator.CalculateSalary();
        }