Question: 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 PleaseIn java Please 10.12 (Accounts Payable System Modification) It's possible to include

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 subclasses

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!