Class SalariedEmployee
overrides function earnings
to return the employee’s weekly salary, so the function pointer points to the earnings
function of class SalariedEmployee
. SalariedEmployee
also overrides print
, so the corresponding function pointer points to the SalariedEmployee
member function that prints "salaried employee: "
followed by the employee’s name, social security number and weekly salary.