Payroll Calculator for Both Hourly and Commission Employees
In assignment 13, we will create a payroll calculator that calculates gross pay, taxes, and net pay for both hourly and commission employees. It will then display those results to the screen.
In this assignment, information common to all employees (e.g. first name, last name, employee ID, tax rate) will be stored in a class. From this class, you will extend two subclasses. The first class will have two variables that are unique to hourly employees (e.g. hours worked, pay rate) and a method unique to hourly employees (e.g. calculate gross pay by multiplying hours worked by pay rate). The second class will have two variables that are unique to hourly employees (e.g. sales total, commission rate) and a method unique to hourly employees (e.g. calculate gross pay by sales total by commission rate).
The program will also need to calculate taxes paid and net pay. You may either code that directly into this program or call it from the payroll functions class you wrote in earlier assignments.
The program should ask the user if they performing calculations for hourly employees of commission employees. Depending on which selection they make, the program will either utilize an object of the hourly employee class or an object of the commission employee class.
Write pseudocode in (Microsoft Word or similar word processing program) that outlines the steps you will undertake to complete this program. Save the pseudocode in a file named
payrollCalculator3.doc. Name your source code payrollCalulator4.java and compile it. Upload and submit the payrollCalulator4.doc,payrollCalulator4.java, and payrollCalulator4.class files to Blackboard.
Please upload and submit the payrollFunctions.java and payrollFunctions.class files if they had to be modified to work with the current program.
Your output should look something like this.
Additional Challenges:
1. For 20 extra points, write this program as a GUI.