public static void TestCase2() { Employee salariedEmployee = new SalariedEmployee(); var result = salariedEmployee.Accept(new HoursPayReport()); Console.WriteLine(result); Employee hourlyEmployee = new HourlyEmployee(); result = hourlyEmployee.Accept(new HoursPayReport()); Console.WriteLine(result); }
public override string Visit(HourlyEmployee employee) { // generate the line of the report. return("100 Hours and $1000 in total."); }
public abstract string Visit(HourlyEmployee employee);