Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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:

  1. Populate Employees
    1. You should populate an array of employees in your program:
      1. Hourly Employee
        1. Prompt for Hours
        2. Prompt for Rate
        3. Make sure to calculate for overtime at time and a half
  2. Select Employee
    1. Loop through your array and select the employee
    2. Once the employee is selected you will get a menu inside of each Employee that allows you to select the following
      1. Calculate Gross Pay
      2. Calculate Tax
      3. Calculate Net Pay
      4. Calculate Net Percent
      5. Display Employee (You can make this method calculate all before displaying)
  3. Save Employees
    1. Save the array or collection of Employees as a serialized object
    2. Additionally you will save a file/report of each employee as a text file
  4. Load Employee
    1. You will load back in the serialized objects from the saved file
    2. You should use a boolean variable that is set to true if you have loaded employees
      1. 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Conceptual Database Design An Entity Relationship Approach

Authors: Carol Batini, Stefano Ceri, Shamkant B. Navathe

1st Edition

0805302441, 978-0805302448

More Books

Students also viewed these Databases questions