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 getTotalPay( 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; // pay amount per month /** * Calculates the amount paid to the employee based on the number of months specified @param numMonths Number of months * Greturn The amount paid to the employee for numMonths months */ public double getTotalPay( int numMonths )( * numMonths: return salary
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 getTotalPay( 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; // pay amount per month /** * Calculates the amount paid to the employee based on the number of months specified @param numMonths Number of months * Greturn The amount paid to the employee for numMonths months */ public double getTotalPay( int numMonths )( * numMonths: return salary
C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter11: Inheritance And Composition
Section: Chapter Questions
Problem 9PE
Related questions
Question
100%
Need help asap:
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 5 steps with 1 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage