public override ISalaryProcessing RunSalaryProcessing(EmployeeType employeeType) { ISalaryProcessing salaryProcessing = null; switch (employeeType) { case EmployeeType.TEMPORARY: salaryProcessing = new TemporaryEmployee(); break; default: salaryProcessing = base.RunSalaryProcessing(employeeType); break; } return(salaryProcessing); }
public virtual ISalaryProcessing RunSalaryProcessing(EmployeeType employeeType) { ISalaryProcessing salaryProcessing = null; switch (employeeType) { case EmployeeType.FULLTIME: salaryProcessing = new FullTimeEmployee(); break; case EmployeeType.CONTRACT: salaryProcessing = new ContractEmployee(); break; } return(salaryProcessing); }