Question: Create a Java program called PayCheck## (where ## is your initials) to do the following: Prompt the user for hours worked and hourly pay rate.

Create a Java program called PayCheck## (where ## is your initials) to do the following:

  1. Prompt the user for hours worked and hourly pay rate. This program will allow the user to enter the values to see the estimated paychecks if the user does not enter a 0. You need to use ReadFloatFromUser. Once 0 is entered, the program will end and display the message "Pay Check Calculator Program Ended". All user input must be validated.

  1. Create a method calculatePaythat will calculate the gross pay based on parameters hoursWorked and payRate. Be sure to pay 1.5x the pay for any hours over 40 hours. Be sure to name your variables using the naming conventions taught in this course.

  1. Create a method calculateTaxType (4 tax methods)that will calculate the taxes based on the grossPay parameter. To keep this simple, assume the tax rates are as follows: Federal tax rate = 25%, State tax rate = 7%, Local tax rate = 2.5%, and FICA tax rate = 4.75%

  1. The output must display the gross pay, federal taxes, state taxes, local taxes, FICA taxes, and net pay rate. For example:

Please enter number of hours worked or 0 to end program:40

Please enter the payrate or 0 to end program:10

Your Gross Pay is---> 400.00

Federal is----------> 100.00

State Tax is--------> 28.00

Local Tax is--------> 10.00

FICA Tax is---------> 19.00

------------------------------

Net Pay is----------> 243.00

Please enter number of hours worked or 0 to end program:50

Please enter the payrate or 0 to end program:10

Your Gross Pay is---> 550.00

Federal is----------> 137.50

State Tax is--------> 38.50

Local Tax is--------> 13.75

FICA Tax is---------> 26.13

------------------------------

Net Pay is----------> 334.13

Please enter number of hours worked or 0 to end program: 0

Pay Check Calculator Program Ended

  1. Be sure to provide comments for your class and all the methods (including the main method). Include a print-screen of your test results with your homework submission .

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 Programming Questions!