Question: 1. Develop a simple Java based payroll system that can calculate the weekly pay due for different categories of employees. The system should be implemented

1. Develop a simple Java based payroll system that can calculate the weekly pay due for different categories of employees. The system should be implemented using the following design guidelines: Implement an abstract base class called Employee that is used to hold and access basic information about an employee e.g. name, address, etc. This class should also define an abstract method called earnings0 that returns the weekly pay for each type of employee. The class should include a suitable constructor and accessor methods to retrieve information about the employee a: 7 MARKS b: Implement a class called Manager, derived from Employee. A manager is paid a fixed weekly salary. The class should include a suitable constructor and should also implement the earnings0 method. 6 MARKS Implement a class called HourlyWorker, derived from Employee. An hourly worker is paid a fixed wage per hour, so in any given week they will be paid for the number of hours worked in the past week. The class should include a constructor and implement the earnings0 method. c: 6 MARKS d: Write a short driver program that creates an object for each of the employee sub-classes, it then calls the earnings) method for each object and displays the results. 6 MARKS
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
