Create a base class Employee that has the following attributes:
Employee’s name (String)
employee’s address (String)
vehicle data (Vehicle).
Now create classes FullTimeEmployee, HourlyEmployee and Consultant that inherit from Employee. The child classes have the following additional properties
FullTimeEmployee – salary (double)
HourlyEmployee - hoursWorked (int) and hourlyRate (double).
Consultant – hoursWorked (int) and ProjectType. Create constructor, accessor and mutator methods as needed for all these classes.
Compensation for each employee type is to be computed as follows:
FullTimeEmployee: Compensation is salary minus taxes. Taxes are calculated based on the tax rate in the table below: See image.
For example someone whose salary is $123,000 will pay 18% on the first 35,000, 28% on the next (82,000 – 45,000) and 33% on the remaining( 123,000 – 82,000)
HourlyEmployee: Compensation is hoursWorked times hourlyRate for the first 40 hours. For hours in excess of 40 hours the hourly rate is 1.8 times the regular hourly rate. For example, someone whose hourlyRate is $12.50 and who has worked 48 hours will earn 40 * $12.5 + 8 * $12.5 * 1.8
Consultant: Compensation is hourlyRate times the hours worked. HourlyRate for Consultants is computed based on the ProjectType as given in the table below: See image.
Now write a driver program to do the following:
Accept input for new Employees
Display employee information for all the employees that are there in the system.
List the name of the Employees along with the compensation received by each.
Display the employee name together with the make, model and mileage of all vehicles whose mileage is greater than 78000 miles.
Exit the system after writing all information to a file.
Details of the Vehicle class are as follows: It has four instance variables – make, model, year of manufacture and mileage. It should have constructor, accessor, mutator methods as appropriate.
It is not our intention to break the school's academic policy. Projects posted are only used as a reference
and should not be submitted as is. We are not held liable for any misuse of the solutions.
Please see the frequently asked questions page
for further questions and inquiries.
Kindly fill out the form.
Please provide a valid email address and we'll get back to you in less than 24 hours.
We will be sending an invoice through PayPal upon confirmation.
We are a non profit organization however we need an amount to keep this organization running,
and to be able to complete our research and development.