ANDCO Home Enterprise is a company that specializes in the design of high-end home furniture and fixtures.
Question:
ANDCO Home Enterprise is a company that specializes in the design of high-end home furniture and fixtures. Currently the company has a staff quota of twenty (20) full time employees and ten (10) contracted employees. ANDCO would like to automate their employee records system. This automated system will store employee names, identification numbers, employee status, salary, date employed. A full time employee is required to work forty (40) hours per week at a rate of $500 per hour. Overtime pay for full time employees is calculated at 1.5 * 500 (therefore if a full time employee works 5 hours overtime there overtime pay is $3750). Contracted employees are also required to work forty (40) hours per week at a rate of $700 per hour. Contracted workers are paid a stipend of $2000 if they complete three (3) hours of overtime, however a contracted worker cannot work more than six additional hours per forty hours work week. For both categories of workers, total employee salary is equal to regular pay plus overtime pay. Both categories of workers are paid on a monthly basis (every four weeks). Therefore, the total regular hours worked per month is 160 hours.
WHAT IS REQUIRED
Write a complete program to show a clear demonstration of inheritance in Java. You are going to design a program that will store the information on the company’s employees. Your program must have the following classes:
- EmployeeMain: This class will contain the Main() method for your program.
- Employee: This is the superclass (parent class) for your program. It should contain the following fields (attributes) and methods:
- Fields: employee names, identification numbers, status, date employed.
- Methods: one or more methods to get and set the field values. It should also contain a method to accept and display the field values (i.e. employee names, identification numbers etc.).
- FullTime: This class is a sub class of the Employee class. This class should contain a field for storing full time employee salary and hours worked. It should also contain a method for calculating full time employee salary.
- Contract: This class is a sub class of the Employee class. The Contract class should contain a field for storing contracted employee salary and hours worked. It should also contain a method for calculating a contracted employee salary.
Additional Requirements
- Implement the classes mentioned above as different class files within the same project.
- Your classes should have any necessary or relevant constructors.
- Both the FullTime and Contract classes should have an additional method for displaying all employee information (i.e. employee names, identification numbers, salary etc.).
- Create objects of the FullTime and Contract classes to invoke or call the methods they contain. The objects must be created in the EmployeeMain class.