Ejemplo n.º 1
0
        public string Visit(ElementV element, bool test)
        {
            EmployeeV employee = element as EmployeeV;

            // Provide 3 extra vacation days
            employee.VacationDays += 3;
            return($"{employee.GetType().Name} {employee.Name}'s new vacation days: {employee.VacationDays}");
        }
Ejemplo n.º 2
0
        public string Visit(ElementV element, bool test)
        {
            EmployeeV employee = element as EmployeeV;

            // Provide 10% pay raise
            employee.Income *= 1.10;
            return($"{employee.GetType().Name} {employee.Name}'s new income: {employee.Income:C}");
        }
Ejemplo n.º 3
0
        public void Visit(ElementV element)
        {
            EmployeeV employee = element as EmployeeV;

            // Provide 3 extra vacation days
            employee.VacationDays += 3;
            Console.WriteLine("{0} {1}'s new vacation days: {2}",
                              employee.GetType().Name, employee.Name,
                              employee.VacationDays);
        }
Ejemplo n.º 4
0
        public void Visit(ElementV element)
        {
            EmployeeV employee = element as EmployeeV;

            // Provide 10% pay raise
            employee.Income *= 1.10;
            Console.WriteLine("{0} {1}'s new income: {2:C}",
                              employee.GetType().Name, employee.Name,
                              employee.Income);
        }