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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!