Create an abstract super class called Employee with the following attributes: Use JavaDoc comments in the Parent and Child Classes only but use @author for the driver name : String and the following methods getter and setter for the one attribute two constructors an abstract method called getPay() equals() toString()
Create an abstract super class called Employee with the following attributes:
Use JavaDoc comments in the Parent and Child Classes only but use @author for the driver
name : String
and the following methods
getter and setter for the one attribute
two constructors
an abstract method called getPay()
equals()
toString()
Create a sub class of Employee called SalaryEmployee with the following attribute
yearlyPay : double
and the following methods
getter and setter for the one attribute
two constructors
getPay() that returns the yearlyPay divided by 52
equals()
toString()
Create a sub class of Employee called HourlyEmployee with the following attributes:
hoursWorked : double
payrate : double
and the following methods
getters and setters for the two attributes
two constructors
getPay() that returns the weekly pay (multiply hoursWorked by payrate - overtime included and 1.5 times payrate for hours > 40)
equals()
toString()
Create a sub class of Employee called SalesEmployee with the following attributes:
salesAmount : double
and the following methods
getter and setter for the one attribute
two constructors
getPay() that returns the amount of sales multiplied by 10%
equals()
toString()
Demonstrate these in a "driver"
The driver will
create an ArrayList of Employees from this data file
h,John Smith,49,12.34
c,Alice Marks,12000,
s,Josie Parton,200000,
h,Humphrey Bogart,50,9.36
h,Joseph Cotton,4,10.55
c,Orson Welles,56456,
c,John Cazale,125698,
s,Ellen Burstyn,500365,
c,Stefania Sandrelli,3625,
h,Hanna Schygulla,30,32.45
h,Olivia deHavilland,60,41.23
h = hourly s = salary c = commission and that is the sales person
have a method to create the ArrayList
have a method to display all items in the ArrayList
have a method to search the ArrayList for a Employee name (user entered - you can use the entire name here, but it would be better if you searched only for last name - how would you do that??)
have a method to search the ArrayList for all Employees that make more than a user-entered amount
a method that will display a short menu of options (Hourly Employee, salary Employee, sales Employee), the user will enter which type of employee they would like to see, your code will traverse the ArrayList for employees of that type and display.
Deliverables
A zipped folder containing the following:
Employee.java
SalaryEmployee,java
HourlyEmployee.java
SalesEmployee.java
EmployeeDriver.java
Trending now
This is a popular solution!
Step by step
Solved in 2 steps