Question: Objective In module 3 Module 3 - Lab - Employee, you created an Employee class. I would like you to create 2 sub - classes
Objective
In module
Module Lab Employee, you created an Employee class. I would like you
to create subclasses of an Employee for this Lab. The subclasses will both inherit from
the Employee Class. The following two classes will need to be created. Please ensure
aggregated classes have copy constructors and they are used in the appropriate places.
Salary
Attributes:
Annual Salary getterssetters
Monthly Bonus getterssetters
Constructor
Constructor to populate all arguments
Additional Methods
Calculate Pay In our fictitious company, our salaried employees are paid times
per month total paychecks per year Calculate the amount the employee will
get paid before taxes. Be sure to include of the monthly bonus in each check.
Override the PrintEmployeelnformation of the Employee class to also print the
employee's gross pay for the pay period.
Hourly
Attributes:
Hourly rate getterssetters
Hours worked per week getterssetters Remember to calculate overtime
Overtime is time and a half for every hour over
Constructor
Constructor to populate all arguments
Additional Methods
Calculate Pay in our fictitious company, our hourly employees are paid every
week. Calculate the amount the employee will get paid before taxes for a week.
Please be aware of overtime pay.
Override the PrintEmployeeInformation of the Employee class to also print the
employees gross pay for the week.
Driver Program
Create a Driver Program to demonstrate the use of each of the classes Salary and Hourly
For the Driver Program, you do not need to get any user input simply invoke the needed
constructors and print the information for each type of employee.
Deliverables
Upload the following files in a zip folder that you have created:
Java class files
Screenshot of the Console with the code executing
Down below is the code of the Employee class mentioned from module
package Three;
public class Employee
private String employeeID;
private String firstName;
private String lastName;
private Address employeeAddress;
private Benefit employeeBenefit;
public EmployeeString employeeID, String firstName, String lastName, Benefit employeeBenefit, Address employeeAddress
this.employeeID employeeID;
this.firstName firstName;
this.lastName lastName;
this.employeeBenefit employeeBenefit;
this.employeeAddress employeeAddress;
public String printEmployeeInformation
return Employee Information
"Employee Details:
firstName lastName employeeID
employeeAddress.printAddress
"Benefits:
employeeBenefit.printBenefit;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
