Practice · 1 of 3
Payroll over a mixed list
CHALLENGE
Difficulty: advanced+25 XP
Complete Employee (fields name, base; pay() returns base) and Manager extends Employee (extra field bonus; pay() returns base **plus** bonus, using super.pay()). Then implement payroll(ArrayList<Employee>) summing every employee's pay().
The list mixes both types; dispatch must do the work.
Press Submit to check your solution.
Back to lesson: Practice: Polymorphism gauntlet