Programming and Problem Solving with Java

(やまだぃちぅ) #1

Case Study Follow-Up


1.Modify the Payrollapplication to handle a fourth employee. Use your own
name, and be generous with your pay.
2.Change the Employeeclass to also return the hours worked, and modify the
Payrollapplication to echo-print the hours that were entered for each
employee.
3.Modify the Payrollapplication to also calculate and print the average pay.
4.Change the Employeeclass to also compute the average pay and provide a
method that returns it, and then modify the Payrollapplication to display the
average using the new method.
5.If you did Exercises 3 and 4, compare the different versions of Payroll. Which
do you think is simpler?

151
Free download pdf