Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In java Please 10.12 (Accounts Payable System Modification) It's possible to include the functionality of the pay- roll application (Figs. 10.4-10.9) in the accounts payable
In java Please
10.12 (Accounts Payable System Modification) It's possible to include the functionality of the pay- roll application (Figs. 10.4-10.9) in the accounts payable application without modifying Employee subclasses SalariedEmployee, HourlyEmployee, CommissionEmployee or BasePlusCommission- Emplyee. To do so, you can modify class Employee (Fig. 10.4) to implement interface Payable and declare method getPaymentAmount to invoke method earnings. Method getPaymentAmount would then be inherited by the subclasses in the Employee hierarchy. When getPaymentAmount is called for a particular subclass object, it polymorphically invokes the appropriate earnings method for that subclass. Reimplement Exercise 10.11 using the original Employee hierarchy from the payroll appli- cation of Figs. 10.4-10.9. Modify class Employee as described in this exercise, and do not modify any of class Employee's subclassesStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started