Modify the payroll system of Figs. 10.410.9 to include private instance variable birth Date in class Employee.

Question:

Modify the payroll system of Figs. 10.4–10.9 to include private instance variable birth Date in class Employee. Use class Date of Fig. 8.7 to represent an employee’s birthday. Add get methods to class Date. 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 one in which the Employee’s birthday occurs.

Fig. 10.4

I // Fig. 10.4: Employee.java 2 // Employee abstract superclass. 3 4 5 6 7 8 9 10 || 12 13 14 15 16 17 18 19

Fig. 10.9

I 2 3 5 6 7 8 9 10 || 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 20 1 2 3 4 35 36 31 38 39

Fig. 8.7I // Fig. 8.7: Date.java // Date class declaration. 2 3 4 5 6 7 8 9 10 || 12 13 14 15 16 17 18 19 20 NO 21 22

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  answer-question

Java How To Program Late Objects Version

ISBN: 9780136123712

8th Edition

Authors: Paul Deitel, Deitel & Associates

Question Posted: