Question: How do I start this?... Payroll Program: Create a Java application in NetBeans called Lab04 that creates an employees paystub information. The program should first

How do I start this?... Payroll Program: Create a Java application inHow do I start this?...

Payroll Program: Create a Java application in NetBeans called Lab04 that creates an employees paystub information.

The program should first declare the constants as final doubles for the following withholding rates:

SOC_SEC_RATE = 0.06;

MEDICARE_RATE = 0.01;

UNION_DUES_RATE = 0.01;

RETIREMENT_PLAN_RATE = 0.02;

RETIREMENT_HEALTH_RATE = 0.03;

Next, it should capture the employees hours worked in a week, the employees hourly pay rate, the federal tax withholding rate, and state tax withholding rate. Use the Scanner class in Java located in the java.util library (e.g. include this statement: import java.util.Scanner;).

The program should print out a Paystub Banner (see example run below), the employees hours worked, hourly pay rate, gross pay, and then a Deductions. This section indents two spaces and reports the Federal Tax, State Tax, Social Security Tax, Medicare tax, Union Dues, Retirement Plan, and Retirement Health withholding rates as a percent, the associated actual deductions, the Total Deductions, and the Net Pay. Gross pay should be calculated by multiplying the number of hours per week by the hourly rate. If the employee works more than 40 hours in a week, then the employee is paid at a rate of 1.5 times the pay rate for the hours above 40. Net Pay should equal the Gross Pay minus the total deductions. All dollar amounts should be preceded by a $ and reflect two decimal places. You should use the printf method to format all dollar amounts so that they display accurately including when you have 0 cents (e.g. $51.00).

Also, please use the \t (tab) escape sequence to format your output. To print a %, you should enter two (e.g. %%). Your output should be formatted exactly as the example run below and your calculations should be accurate to the penny. You must use variable names and constant names that conform to the naming conventions discussed in the text book. Also, please include block comments, line comments, and a program header documentation block. Below is an example (Of course, you would replace my name with your name as Program Author):

Sample runs: Please enter number of hours worked in a pay period: 40 Please enter hourly pay rate: 10 Please enter federal tax withholding rate le.g. 0.15): 0.15 Please enter state tax withholding rate le.g. 0.045): 0.10 Please enter number of hours worked in a pay period: 50 Please enter hourly pay rate: 10 Please enter federal tax withholding rate le.g. 0.15): 0.15 Please enter state tax withholding rate (e.g. 0.045): 0.10 H = hhhh = hhhh = hhhh = hhhh = A * Paystub Information: * * Paystub Information: * Hours Worked: 40.00 Pay Rate: $10.00 Gross Pay: $400.00 Deductions: Federal Tax (15.03): State Tax (10.03): Social Security Tax (6.0%): Medicare Tax (1.03): Union Dues (1.03): Retirement Plan (2.03): Retirement Health (3.03): Total Deductions: $60.00 $40.00 $24.00 $4.00 $4.00 $8.00 $12.00 $152.00 Hours Worted: 50.00 Pay Rate: $10.00 Gross Pay: $550.00 Deductions: Federal Tax (15.03): State Tax (10.03): Social Security Tax (6.0%): Medicare Tax (1.03): Union Dues (1.03): Retirement Plan (2.03): Retirement Health (3.03): Total Deductions: $82.50 $55.00 $33.00 $5.50 $5.50 $11.00 $16.50 $209.00 Net Pay: $248.00 Net Pay: $341.00

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!