Need Help ?

Home / Expert Answers / Other / Description Exercises 9.3 Many program written with inheritance could be written with composition

Description Exercises 9.3 Many program written with inheritance could be written with composition ...


Description Exercises 9.3 Many program written with inheritance could be written with composition instead and vice versa. Rewrite class BasePlusCommissionEmployee (fig9.11 ) of the commissionEmployeeBasePlusCommissionEmployee hierarchy to use composition rather than inheritance. Exercise 10.12 (Payroll System Modification) Modify the payroll system of Fig. 10.4 Fig. 10.9 to include private instance variable birthDate in class Employee. Use class Date of Fig. 8.7 to represent an employee’s birthday. Add get methods to class Date and replace method toDateString with method toString. Assume that payroll is processed once per month. Create an array of Employee variables to store references to the various employee objects. In a loop, calculate the payroll for each Employee (polymorphically), and add a $100.00 bonus to the person’s payroll amount if the current month is the month in which the Employee’s birthday occurs.



Radioactive Tutors

Radio Active Tutors is a freelance academic writing assistance company. We provide our assistance to the numerous clients looking for a professional writing service.

NEED A CUSTOMIZE PAPER ON THE ABOVE DETAILS?
Order Now


OR

Get outline(Guide) for this assignment at only $10

Get Outline $10

**Outline takes 30 min - 2 hrs depending on the complexity and size of the task
Designed and developed by Brian Mubichi (mubix)
WhatsApp