public void Visit(Element element) { Employee employee = element as Employee; employee.Income *= 1.10; Console.WriteLine("{0} {1}'s new income: {2:C}", employee.GetType().Name, employee.Name, employee.Income); }
public void Visit(IElement element) { Employee employee = element as Employee; employee.PaidTimeOffDays += 3; Console.WriteLine($"{employee.GetType().Name} {employee.Name}'s new vacation days: {employee.PaidTimeOffDays}"); }
public void Visit(IElement element) { Employee employee = element as Employee; employee.AnnualSalary *= 1.10; Console.WriteLine($"{employee.GetType().Name} {employee.Name}'s new income: {employee.AnnualSalary}"); }
public void Visit(Element element) { Employee employee = element as Employee; // And because you all helped have such a great year, all my employees get three extra paid time off days each! employee.PaidTimeOffDays += 3; Console.WriteLine("{0} {1}'s new vacation days: {2}", employee.GetType().Name, employee.Name, employee.PaidTimeOffDays); }
public void Visit(Element element) { Employee employee = element as Employee; // We've had a great year, so 10% pay raises for everyone! employee.AnnualSalary *= 1.10; Console.WriteLine("{0} {1}'s new income: {2:C}", employee.GetType().Name, employee.Name, employee.AnnualSalary); }
public void Visit(Element element) { Employee employee = element as Employee; // Provide 3 extra vacation days Console.WriteLine("{0} {1}'s new vacation days: {2}", employee.GetType().Name, employee.Name, employee.VacationDays); }
public void Visit(Element element) { Employee employee = element as Employee; // Proporcionar un aumento salarial del 10% employee.Income *= 1.10; Console.WriteLine("{0} {1} Los nuevos ingresos son: {2:C}", employee.GetType().Name, employee.Name, employee.Income); }
public void Visit(Element element) { Employee employee = element as Employee; // Proporcionar 3 días adicionales de vacaciones employee.VacationDays += 3; Console.WriteLine("{0} {1} días de vacaciones nuevos: {2}", employee.GetType().Name, employee.Name, employee.VacationDays); }
public void Visit(Element element) { Employee employee = element as Employee; // Provide 10% pay raise employee.Income *= raise; Console.WriteLine("{0} {1}'s new income: {2:C}", employee.GetType().Name, employee.Name, employee.Income); }
public void Visit(Employee employee) { var bonus = employee.Earning * 1; Console.WriteLine($"{employee.GetType().Name} anual bonus is {bonus}"); }