private double CalculateSalary(Employee employee) { ISalary salary = CreateSalary(employee.ContractTypeName); if (salary != null) { return(salary.CalculteAnnualSalary(employee)); } return(0); }