Write a program that uses functions to calculate a person’s paycheck. The program should ask for a person’s first and last name, social security number (use fakes), phone number, address, hours worked (in the week), and hourly wage. The program should also include overtime (time and a half) if they have worked more than 40 hours. The program should also take out federal taxes (8%). The program should display the results to the screen. The program should run until the user chooses to quit. Have functions to do the following.
• Compute overtime for a person (for the given week).
• Compute federal tax on a person’s pay.
• Compute a person’s after-tax pay
All input and output should be done in main. The output should include the person’s first and last name, social security number, phone number, address, federal tax, and after-tax pay.
Turn in a design for this program at the beginning of the next lab.
• For each function, state what its parameters are, what it returns, and how it computes the returned value from the parameter values passed to it.
• List the steps in main, including function calls. Identify what is in the while loop. Indicate the condition for the while loop.
You will later modify this program so that, besides displaying the results to the screen, it will also write the information to a file called paycheck.dat.
• Compute overtime for a person (for the given week).
• Compute federal tax on a person’s pay.
• Compute a person’s after-tax pay
All input and output should be done in main. The output should include the person’s first and last name, social security number, phone number, address, federal tax, and after-tax pay.
Turn in a design for this program at the beginning of the next lab.
• For each function, state what its parameters are, what it returns, and how it computes the returned value from the parameter values passed to it.
• List the steps in main, including function calls. Identify what is in the while loop. Indicate the condition for the while loop.
You will later modify this program so that, besides displaying the results to the screen, it will also write the information to a file called paycheck.dat.
Comment