Question: The method header includes it's accessibility modifier (for example, public), return type, name and parameters. For example, for getTotalPay() below, it's header is: public double

The method header includes it's accessibility modifier (for example, public), return type, name and parameters. For example, for getTotalPay() below, it's header is: public double getTotalPayl int numMonths). Assume that you have a manager class that inherits from the Employee class below. Given the getTotalPay() method in the Employee base class, write the method header for a method in the Manager class that overrides getTotalPay(). Represents a generic employee with only a salary public class Employee protected double salary: 1/ pay amount per month Calculates the amount paid to the employee based on the number of months specified @param numMonths Number of months @return the amount paid to the employee for numMonths months public double getTotalPay( int numMonths) return salary numMonths
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
