Question
Java Important: All the classes that you implement are to provide a constructor with enough parameters to initialize all instance variables and, unless specified, all
Java
Important: All the classes that you implement are to provide a constructor with enough parameters to initialize all instance variables and, unless specified, all classes also have to provide a copy constructor. Additionally, all classes need to provide a getter and a setter method for every instance variable, as well as the toString method, which returns a String with the value of all instance variables including labels. Include javadoc comments for all the classes, constructors, and methods in the project.
Employee This is an abstract class; it represents an employee in the company. Private Instance Variables: employeeID of type int firstName of type String lastName of type String listOfPaychecks of type ArrayList Notes: The toString method needs to iterate through the list of paychecks and include their information in the returned string.
HourlyEmployee - This class extends the Employee class. It represents an employee that gets paid by the hour. Private instance variables: hourlyRate of type double periodHours of type double
SalariedEmployee This class extends the Employee class. It represents an employee that gets paid a salary. Private instance variable: annualSalary of type double Manager This class extends the SalariedEmployee class. It represents a departments manager. Private instance variables: bonus of type double
Paycheck This class represents a single paycheck that an employee receives for a pay period. Private instance variables: employeeID of type int periodBeginDate of type String periodEndDate of type String grossAmount of type double taxAmount of type double bonusAmount of type double netAmount of type double
Department This class represents a department within the company. Private instance variables: departmentID of type int departmentName of type String departmentManager of type Manager listOfEmployees of type ArrayList
Notes: The toString method needs to iterate through the list of employees and include their information in the returned string. Company This class represents the company that is using this system to maintain their information. Private instance variables: companyName of type String listOfdepartments of type ArrayList
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started