Beruflich Dokumente
Kultur Dokumente
1 Overview
What you will be making: You will be making a system that will keep track of different types of
employees.
Assignment Objectives:
Design, Implement and Test a fully working program.
More practice with Java file input and output.
Demonstrate your understanding of inheritance polymorphism.
Enhance your Object Oriented design using packages.
Use exceptions to catch input errors and take corrective action.
Construct a non-trivial but still basic human interface;
3 Design Requirements
1. The classes must be organized into Java packages.
2. The employee information must held in objects using inheritance.
3. Object persistence must be accomplished using inheritance polymorphism (i.e. there cannot be
completely separate methods to load and unload the different types of employees).
Page 1 of 4
October 18, 2017 [COMP 1502 A4 PAYROLL SYSTEM]
Employees
The company has three types of employees: Hourly, Salary, and Commission. The table below
describe each type of employee
Since this implementation has a superclass and subclasses, some of what is listed above may be in the
superclass only, some in subclasses only, some may need to be in both. You will need to decide to
which classes each method belongs to. In addition, you may need to add methods in the superclass that
are overridden in the subclass. You may give your methods different names than the names above You
will probably need additional methods.
Special requirement: Since you are using subclasses there must not be a Type field. For example, do
NOT have a field in the employee object with value H for hourly employees. The type of an employee is
determined by the subclass you create.
A adds a new employee (must check that employee not already in the personnel list)
I once a valid social insurance number is entered, prints out the information about an
employee
D once a valid social insurance number is entered, this displays the employees name social
insurance number and asks the user to verify deleting the employee. If they enter Y, the
employee is then deleted. Otherwise, no action is taken and returns to the main menu.
S once a valid social insurance number is entered, this calculates and prints the weekly
salary for an employee
T this prints the list of Commission employees who are topSellers showing at least the name
sin and sales
P this prints the weekly salary report for all the employees. It should be similar to:
Arnold 123-456-789 Hourly $ 625.00
Beatrice 222-333-444 Salary $ 750.00
Charles 555-777-666 Commission $ 672.35
Page 3 of 4
October 18, 2017 [COMP 1502 A4 PAYROLL SYSTEM]
Page 4 of 4