Below, you can see two classes: the outer class Intern and the nested class Salary. Every intern works at least 20 hours a week (the baseWorkload for interns in the company) and gets the basePay 50 units for it. For each extra hour a week, the intern gets the extraHoursPay 2.8 units. Thus, an intern working 20 hours a week will get a base salary of 50 units, and an intern working 40 hours a week will get 106 units.
End the weeklySalary code line using the charging rules described above.