public void Visit(Element element)
        {
            Employee employee = element as Employee;

            employee.PaidTimeOffDays += 3;
            Console.WriteLine("{0} {1}'s new vacation days: {2}", employee.GetType().Name, employee.Name, employee.PaidTimeOffDays);
        }
Ejemplo n.º 2
0
        public void Visit(Element element)
        {
            Employee employee = element as Employee;

            employee.AnnualSalary *= 1.10;
            Console.WriteLine("{0} {1}'s income: {2:C}", employee.GetType().Name, employee.Name, employee.AnnualSalary);
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
        public void Visist(Element element)
        {
            Employee employee = element as Employee;

            // Provide 10% pay raise
            employee.Income *= 1.10;
            Console.WriteLine("{0} {1}'s new income: {2:C}", employee.GetType().Name, employee.Name, employee.Income);
        }
        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);
        }
Ejemplo n.º 6
0
        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);
        }