Wite a program that calculates and outputs the monthly


Complete the following two programs:

Programming Problem 1

Write a program that calculates and outputs the monthly paycheckinformation for an employee, including all the amounts deductedfrom an employee's gross pay, and the net pay that is due to theemployee. The user of your program will know the employee's nameand the gross pay for the employee. Each employee has the followingdeductions taken from his gross pay:

Federal Income Tax: 15%
State Tax: 3.5%
Social Security + Medicare Tax: 8.5%
Health Insurance $75

The output from your program should be structured as is displayedbelow:

Bill Robinson
Gross Amount: ............ $3575.00
Federal Tax: ............. $ 536.25
State Tax: ............... $ 125.13
Social Sec / Medicare: ... $ 303.88
Health Insurance: ........ $ 75.00
Net Pay: ................. $2534.75

Your program should deal with erroneous input values. Gross salaryshould always be a positive number. Make sure that you deal withthe possibility that the user may have entered a non-numeric inputvalue. Have your program output appropriate error messages in thesecases.

1. Identify the inputs and outputs of the problem.

2. Identify the processing needed to convert the inputs to theoutputs.

3. Design an algorithm in pseudocode to solve the problem. Makesure to include steps to get each input and to report each output.Include steps to deal with error cases.

4. Identify three test cases, one using a positive number, and oneusing a negative number, and one using incorrect input (ie. Input aletter rather than a digit for the numeric input). For each of thethree test cases show what inputs you will use and what yourexpected outputs should be.

5. Write the program to implement your algorithm. Test your programusing your test cases.

Programming Problem 2

In a right triangle, the square of the length of one side is equalto the sum of the squares of the lengths of the other two sides.Stephanie has the integer lengths of three sides of a triangle andneeds to know if it is a right triangle.

Write a program to solve this problem. NOTE: The user must beallowed to input the values of the sides in ANY ORDER!

1. Identify the inputs and outputs of the problem.

2. Identify the processing needed to convert the inputs to theoutputs.

3. Design an algorithm in pseudocode to solve the problem. Makesure to include steps to get each input and to report eachoutput.

4. Identify five significant test cases including one for incorrectinput (ie. Input a letter rather than a digit for the numericinput). (Think about what impact changing the order of the inputvalues should have on your program!) For each of the five testcases show what inputs you will use and calculate what yourexpected outputs should be.

5. Write the program to implement your algorithm. Test your programusing your test cases.

For each of the two programming problems, create a program usingVisual C++.Net. Make sure to capture a sample of your program'soutput. The best way to do this is to click on the console windowyou want to capture and then press the Alt and PrintScreen keys atthe same time. Then paste your captured screen image into a Worddocument. For each of the two programs, put the screen capturefollowed by a copy of your source code into your Worddocument.

Your final programming document should contain in the followingorder:

1. Answers to the questions listed above.

2. Screen capture of the first program followed by sourcecode.

3. Screen capture of the second program followed by sourcecode.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Wite a program that calculates and outputs the monthly
Reference No:- TGS01568984

Now Priced at $20 (50% Discount)

Recommended (92%)

Rated (4.4/5)