Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Create a console application, no user defined class is necessary for this program, all code is to be implemented in Main. 2. Declare variables

1. Create a console application, no user defined class is necessary for this program, all code is to be implemented in Main.

2. Declare variables that will hold an hourly wage, number of hours worked.

3. Prompt the user to enter values for hourly rate and hours worked. (Don't forget to convert the text console inputs)

4. Compute the gross weekly pay calculated as hours times rate for the the first 40 hours times 1.5 times the rate for any hours over the first 40 hours.

5. Compute the net pay as the gross pay minus withholding; withholding is calculated as 28 percent of gross pay if gross pay is greater than $1000 21 percent of gross pay if gross pay is greater than $600 and less than or equal to $1000 10 percent of gross pay if gross pay is less than or equal to $600

6. Display the input/output as something like the following: Enter hourly pay rate 30.00 Enter hours worked 50 Gross pay is $1650 and net pay is $1188 Press any key to continue . . .

This will require some analysis of the problem before coding is accomplished. It will require an if-else statement to compute gross hours depending on whether hours is 40 or greater than 40. It will require a second if-else statement with a nested if-else to set the withholding rate dependent on the percentage rates listed in requirement 5 above.

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

Step: 3

blur-text-image

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

Oracle Database 11g SQL

Authors: Jason Price

1st Edition

0071498508, 978-0071498500

More Books

Students also viewed these Databases questions