Question
In Java Programming create a program implementing a payroll system that allows you: Populate Employees You should populate an array of employees in your program:
In Java Programming create a program implementing a payroll system that allows you:
- Populate Employees
- You should populate an array of employees in your program:
- Hourly Employee
- Prompt for Hours
- Prompt for Rate
- Make sure to calculate for overtime at time and a half
- Hourly Employee
- You should populate an array of employees in your program:
- 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)
- Save Employees
- Save the array or collection of Employees as a serialized object
- Additionally you will save a file/report 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 rate=30.0f;
float taxrate=0.2f;
int hours=45;
float gross=0.0f;
float tax=0.0f;
float net=0.0f;
float net_percent=0.0f;
//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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started