Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The last photo Is the batch file to be opened and added to. The programming language is java You have been asked to write a

The last photo Is the batch file to be opened and added to. The programming language is java image text in transcribed
image text in transcribed
image text in transcribed
You have been asked to write a program to calculate employee pay amounts for an organization from a batch file. There are two classification of employees: staff and managers. All employees have a unique alphanumeric employee ID but the first letter of the ID distinguishes their classification (s, t, or f for staff or m, n, g, or r for managers - eg. s10013 or m871452). If the ID ends in the letter z or Z that means the employee has chosen to contribute 2% of their gross pay to a charity. Staff are paid hourly and managers are paid salary. Pay checks are issued every two id salary. Pay checks are issued every two weeks. Staff members are paid for the actual hours worked, managers are paid 1/26h of t rs are paid for the actual hours worked, managers are paid 1/26t of their annual salary. If a staf person works more than 80 hours then any additional hours are paid at 1.5 times their base hourly rate. Staff can't work more than 30 hours of overtime. For all employees, the standard tax rate is 15% of gross pay and the standard health insurance contribution rate is 5% of gross pay. If an employee makes more than $1,500 gross pay then their tax rate goes to 20%. If an employee makes more than $2,500 gross pay then their tax rate goes to 25% Managers also contribute 5% of their gross pay to a retirement account. Any employee may earn a bonus of up to 10% of their gross pay that would be added to the gross pay for tax and insurance purposes Your program should open an existing batch file containing employee data in comma delimited format. Your program should implement individual methods to calculate tax, benefit, overtime, bonus, charitable contributions, and net pay. Add these fields along with corresponding data for each record to the original file, including the header. Use 0 for the optional fields if there is no value (e-g. person does t contribute to a charitable organization so enter O). Also add a column for date and enter today's date (7/6/2017) for all records. Any values that represent currency should be formatted to 2 decimal places In a separate file, name it lastnamelabFinal.txt, print out a printer friendly version of the data you processed, sorted by employee last name A->Z. (Print all employee records to the same file.) Use array(s) to store the data from the above step so you don't have to perform the calculations more than once. You should create a method to create the file and save the data pass the array(s) to this method. Any values that represent currency should be formatted to 2 decimal places

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_2

Step: 3

blur-text-image_3

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

Beginning ASP.NET 4.5 Databases

Authors: Sandeep Chanda, Damien Foggon

3rd Edition

1430243805, 978-1430243809

More Books

Students also viewed these Databases questions

Question

What is Change Control and how does it operate?

Answered: 1 week ago

Question

How do Data Requirements relate to Functional Requirements?

Answered: 1 week ago