Question: Can someone help me with the problem on [Java How to Program, 10th Edition] Chapter 10 Problem 15E Thanks in advance =================================================== (Account Payable System

Can someone help me with the problem on [Java How to Program, 10th Edition]

Chapter 10 Problem 15E

Thanks in advance

===================================================

(Account Payable System Modification) In this exercise, you modify the accounts payable application of Figs. 10.11-10.15 to include the complete functionality of the payroll application of Figs,10.4-10.9. The application should still process two Invoice objects, but now should process one object of each of the four Employee subclasses. If the object currently being processed is a Base-PlusCommissionEmployee, the application should increase the BasePlusCommissionEmployees base salary by 10%. Finally, the application should output the payment amount for each object. Complete the following steps to create the new application.

10.4

Can someone help me with the problem on [Java How to Program,10th Edition] Chapter 10 Problem 15E Thanks in advance =================================================== (Account Payable

10.5

System Modification) In this exercise, you modify the accounts payable application of

10.9

Figs. 10.11-10.15 to include the complete functionality of the payroll application ofFigs,10.4-10.9. The application should still process two Invoice objects, but now shouldprocess one object of each of the four Employee subclasses. If theobject currently being processed is a Base-PlusCommissionEmployee, the application should increase the

a) Modify classes HourlyEmployee (Fig. 10.6) and CommossionEmployee (Fig.10.7 in your textbook) to place them in the Payable hierarchy as subclasses of the version of Employee (Fig, 10.13) that implements Payable. [Hint: Change the name of method earnings to getPaymentAmount in each subclass so that the class satisfies its inherited contract with interface payable.]

10.6

BasePlusCommissionEmployees base salary by 10%. Finally, the application should output the paymentamount for each object. Complete the following steps to create the newapplication. 10.4 10.5 10.9 a) Modify classes HourlyEmployee (Fig. 10.6) and CommossionEmployee

10.7

(Fig.10.7 in your textbook) to place them in the Payable hierarchy assubclasses of the version of Employee (Fig, 10.13) that implements Payable. [Hint:

10.13

Change the name of method earnings to getPaymentAmount in each subclass sothat the class satisfies its inherited contract with interface payable.] 10.6 10.7

b) Modify class BasePlusCommissionEmployee (Fig, 10.8) such that it extends the version of class CommissionEmployee created in part (a).

10.8

10.13 b) Modify class BasePlusCommissionEmployee (Fig, 10.8) such that it extends theversion of class CommissionEmployee created in part (a). 10.8 c) Modify PayableInterfaceTest

c) Modify PayableInterfaceTest (Fig,10.15) to polymorphically process two Invoices, one SalariedEmployee, one Hourly Employee, one CommissionEmployee and one Base-PlusCommissionEmployee. First output a String representation of each Payable object. Next, if an object is a BasePlusCommissionEmployee, increase its base salary by 10%. Finally, output the payment amount for each Payable object.

10.15

(Fig,10.15) to polymorphically process two Invoices, one SalariedEmployee, one Hourly Employee, one

CommissionEmployee and one Base-PlusCommissionEmployee. First output a String representation of each Payable

I I Fig. 10.4: Emp loyee.java 2 I/ Employee abstract superclass. 4 public abstract class Employee private final String firstName; private final String lastName; private final String socialSecurityNumber; i0 // constructor public Employee(String firstName, String lastName, 12 String socialSecurityNumber) this.firstName firstName; this.lastName-lastName; this.socialSecurityNumber socialSecurityNumber; 16 17 18 19 20 21 // return first name public String getFirstName O return firstName; 23 24 25 26 27 28 29 30 31 32 // return 1ast name public String getLastNameC return lastName // return social security number public String getSocialSecurityNumberO I I Fig. 10.4: Emp loyee.java 2 I/ Employee abstract superclass. 4 public abstract class Employee private final String firstName; private final String lastName; private final String socialSecurityNumber; i0 // constructor public Employee(String firstName, String lastName, 12 String socialSecurityNumber) this.firstName firstName; this.lastName-lastName; this.socialSecurityNumber socialSecurityNumber; 16 17 18 19 20 21 // return first name public String getFirstName O return firstName; 23 24 25 26 27 28 29 30 31 32 // return 1ast name public String getLastNameC return lastName // return social security number public String getSocialSecurityNumberO

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!