For this assignment, you will take on the role of software developer as part of a team of developers for a retail company. The payroll manager of the company has tasked you with developing a Java program to quickly calculate an employees weekly gross and net pay. The program must prompt the user to enter the employees name, rate of pay, and hours worked. The output will display the information entered into the program along with the calculations for gross pay, total amount of deductions, and net pay.
In this coding assignment, you will utilize the Java syntax and techniques you learned while reviewing the required resources for Week 1. You may select appropriate variable names as long as proper Java syntax is used. You will also submit your source code.
Input:
In the input section, utilize Java syntax and techniques to input the employees name, rate of pay, and hours worked. The input should be completed either via keyboard or via file. As a last resort, the data can be hard-coded into the program.
The input for this calculation is in the table.
Processing:
In the processing section, the following calculations will need to be performed in the processing section:
- Gross Pay:
Gross pay if hours worked are 40 hours or less = hours worked * rate of pay
Gross pay if hours worked are greater than 40 hours = ((hours worked 40) * (rate of pay * 1.5)) + (40 * rate of pay)- Example Employee worked 55 hours. The employees rate of pay is $10.00.
((55 40) * (10 * 1.5)) + (40 * 10) = 625
The gross pay is $625.
- Example Employee worked 55 hours. The employees rate of pay is $10.00.
- Deductions:
Deductions are calculated based upon the following rates:- Federal Tax = 15%
- State Tax = 3.07%
- Medicare = 1.45%
- Social Security = 6.2%
- Unemployment Insurance = .07%
The following calculations are used to calculate each deduction:
- Federal tax amount = federal tax rate* gross pay
- State Tax amount = state tax rate * gross pay
- Medicare amount = Medicare rate * gross pay
- Social Security amount = social security rate * gross pay
- Unemployment Insurance amount = unemployment insurance amount * gross pay
Total deductions = Federal Tax amount + State Tax amount + Medicare amount + Social Security amount + Unemployment Insurance amount
- Net Pay:
The net pay amount is calculated as follows:
Net pay = gross pay amount total deductions
Output:
The Java program should display the following information:
- Employee Name
- Rate of Pay
- Hours Worked
- Overtime Worked
- Gross Pay
- Total amount of deductions
- Net Pay
Your code must include the following as comments:
- Name of program
- Author/students name
- Course name and number
- Instructors name
- Date submitted
Take a screen shot of the results page and save the image. When you are finished with your Java program, zip the file(s). Next, submit the zip folder that contains the running source code to the page. If you need more guidance, review the . Be sure that you are sharing the zip folder with your instructor only. Your instructor will run your source code to ensure that the functionality runs correctly.
In a Word document, describe the object-oriented features of your Java program in a minimum of 200 words. Paste the image of your results. Submit your Word document to Waypoint for grading.
Carefully review the for the criteria that will be used to evaluate your assignment.
Leave a Reply
You must be logged in to post a comment.