public void Appraise(IEmployeeEvaluation employeeEvaluation)
        {
            var employee = employeeEvaluation as Employee;

            // And because you all helped have such a great year,
            // all my employees get three extra paid time off days each!
            employee.VacationDays += 3;

            Console.WriteLine("{0} {1}'s new vacation days: {2}", employee.GetType().Name, employee.Name, employee.VacationDays);
        }
Ejemplo n.º 2
0
        public void Appraise(IEmployeeEvaluation employeeEvaluation)
        {
            var employee = employeeEvaluation as Employee;

            // We've had a great year, so 10% pay raises for everyone!
            // In case that we need different rules for pay raise, we would change IPerformanceReview interface
            // in order to define multiple methods that accept concrete employees (Developer, ProductOwner and ProjectManager).
            employee.AnnualSalary *= 1.10;

            Console.WriteLine("{0} {1}'s new income: {2:C}", employee.GetType().Name, employee.Name, employee.AnnualSalary);
        }