This assignment will use the Employee, Name, Address, and Date classes which you developed for Module Assignment 6. You are to incorporate any fixes indicated in your Module 6 Assignment feedback for this assignment.
Design two sub-classes of Employee, SalariedEmployee and HourlyEmployee. A salaried employee has an annual salary attribute. An hourly employee has an hourly pay rate attribute, an hours worked attribute, and an earnings attribute. An hourly employee that works more than 40 hours gets paid at 1.5 times their hourly pay rate for all hours over 40.
You will decide how to implement constructors, getters, setters, and any other methods that might be necessary.
- (20% of grade) Draw a UML diagram for the classes used in your implementation.
- (80% of grade) Implement the classes, and write a test program that creates a salaried employee and two hourly employees. One of the hourly employees should have hours worked set to less than or equal to 40 and one should have hours worked set to more than 40.
Create a 3-element Employee array and place the three Employees in this array. The test program should display all attributes for the three employees extracted from the array.
Submit the source code and screen shots of each program’s output in a zip file named as follows:
Assignment7 followed by an underscore (_) followed by your first name initial, followed by your last name, followed by your course section number. For example, if your name is Jane Smith and you are in section 81 your zip file would be Assignment7_jsmith81.zip.