Question: Task #3 - Simple Payroll program REVISITED In this task, you will MODIFY your program for Payroll calculations. Add the following capabilities: If the user

Task #3 - Simple Payroll program REVISITED In this task, you will MODIFY your program for Payroll calculations. Add the following capabilities: If the user did not enter their first name, then display "you did not enter your first name" and end the program If the hours entered was greater than 40 hours, then pay the hours worked over 40 at a rate 1.5 times the pay rate entered. Note that up to 40 hours, the pay rate is the same. If the pay rate entered was zero (0), then display "glad that you are working for free" and continue with the normal program execution. ALSO, change your program to accept only String type input from the keyboard. Upon receipt of the hours and the payrate data, convert it to double and continue with processing.

Case 1: Sample Input: First Name > Fred Hours Worked > 40 Pay Rate $> 10.00 Sample Output: The taxes that Fred owes to the government are: Federal Tax: $80.0 State Tax: $20.0 Social Security Tax: $24.8 Local Township Tax: $4.0 What you have left is: $271.2

Case 2: Sample Input: First Name > (NOTHING ENTERED) Sample Output: You did not enter your first name

Case 3: Sample Input: First Name > Fred Hours Worked > 40.0 Pay Rate $> 0 Sample Output:

Glad that you are working for free The taxes that Fred owes to the government are: Federal Tax: $0.0 State Tax: $0.0 Social Security Tax: $0.0 Local Township Tax: $0.0 What you have left is: $0.0

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!