Question: Part 1: You are hired to develop a payroll system for a company. There are three types of employees: Manager, CommissionEmployee, and HourlyWorker The common
Part 1: You are hired to develop a payroll system for a company. There are three types of employees: Manager, CommissionEmployee, and HourlyWorker The common attributes and behaviors for all Employees are firstName, lastName, employeeID (3-digit number Managers get paid a fixed weekly salary, commission employees get paid based on base salary and commission (commission rate x sales, hourly workers get paid an hourly wage wuith time-and-a-half-1.5 times the hourly wage for hours worked over 40 hours. For this assignment, you will create a more general Employee superclass that contains these instance variables and methods and a constructor. Create three other classes (Manager, CommissionEmployee, and HourlyWorker) that all inherit from class Employee. Each subclass should contain only the instance variables and methods that are not declared in superclass Employee as shown below: Manager weekly salary CommissionEmployee: base weekly salary, commission rate, and weekly sales HourlyWorker hours worked, wage (that represents the wages per hour) And earnings method for all the three subclasses to calculate weekly earnings Write a tester program called Payroll.java to test your payroll program as follows: Create an employee for each type of employee, then calculate earnings for each employee. Here is a sample output: Manager: Steve Davis $2000 Commission Employee: rate: 10%) Hourly Worker: John Kanet $1500 (Base salary: $800, sales: $7000, Commission Thomas Hill $1100 (Hourly wage: $20, hours worked: 50)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
