Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Java Programming

Authors: Joyce Farrell

9th edition

1337397075, 978-1337397070

More Books

Students also viewed these Programming questions