Question: For assignment one you will be implementing a payroll system that allows you: Populate Employees You should populate an array of employees in your program:
For assignment one you will be implementing a payroll system that allows you:
Populate Employees
You should populate an array of employees in your program:
Hourly Employee
Prompt for Hours Worked
Prompt for Pay Rate
Make sure to calculate for overtime at time and a half
Select Employee
Loop through your array and select the employee
Once the employee is selected you will get a menu inside of each Employee that allows you to select the following
Calculate Gross Pay
Calculate Tax
Calculate Net Pay
Calculate Net Percent
Display Employee You can make this method calculate all before displaying
Go Back or Exit
Save Employees
Save the array or collection of Employees as a serialized object
Additionally you will save a filereport of each employee as a text file
Load Employee
You will load back in the serialized objects from the saved file
You should use a boolean variable that is set to true if you have loaded employees
This in turn would inform users and prevent them from populating employees if they select that option
Structure of Project:
You are given the code below for your Employee Object.
Payroll Class will have:
Main method
Menu method
Populate Employees method
Select Employee method
Save Employee method
Load Employee method
Employee Class will have:
EMPLOYEE CODE:
public class Employee
Attributes
String Fname;
String Lname;
float ratef;
float taxratef;
int hours;
float grossf;
float taxf;
float netf;
float netpercentf;
End Attributes
Constructors
public Employee
Methods
public void menu
public void computeGross
protected void computeTax
protected void computeNet
protected void computeNetperc
protected void displayEmployee
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
