Question: Problem 12.12 in c#. Please dont copy from somewhere else or attempt if you are weak in C sharp payable app of Figs. 12.11- 12.12
payable app of Figs. 12.11- 12.12 (Accounts Payable System Modification) Modify the accounts 12.15 to include the complete functionality of the payroll app of Figs. 12.4 still process two Invoice objects, but now should process one object of each of the four Employee derived classes. If the object currently being processed is a BasePlusCommissionEmployee, the app should increase the BasePlusCommissionEmployee's base salary by 10%. Finally, the app should out put the payment amount for each object. Complete the following steps to create the new app: a) Modify classes HourlyEmployee (Fig. 12.6) and CommissionEmployee (Fig. 12.7) to place them in the IPayable hierarchy as derived classes of the version of Employee (Fig. 12.13) that implements IPayable. [Hint: Change the name of method Earnings to GetPaymentAmount in each derived class.] Making a Difference Exercise 485 Modify class BasePlusCommission mployee (Fig. 12.8) such ikt it extends the version of class CommissionEmployee created in Part a. e) Modify PayableInterfaceTest (Fig. 12.15) to polymorphically process two Invoices, one SalariedEmployee, one HourlyEmployee, one CommissionEmployee and one Base- PlusCommissionEmployee. First, output a string representation of each IPayable object. Next, if an object is a Base PlusCommi s si on Emp loyee, increase its base salary by 10%. Fi- nally, output the payment amount for each IPayable object
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
