In this exercise, you will create a program that allows the user to enter an employees gross

Question:

In this exercise, you will create a program that allows the user to enter an employee’s gross pay amount as well as his or her filing status and number of withholding allowances. The program should calculate and display the amount of federal withholding tax (FWT) to deduct from the weekly gross pay. 

a. The amount of FWT is based on the employee’s weekly taxable wages and filing status, which is either single (including head of household) or married. The program will need to calculate the weekly taxable wages by first multiplying the number of withholding allowances by $76.90 (the value of a withholding allowance in 2015) and then subtracting the result from the weekly gross pay. For example, if your weekly gross pay is $400 and you have two withholding allowances, your weekly taxable wages are $246.20, as shown in Figure 12-21. 

b. You use the weekly taxable wages, along with the filing status and the appropriate weekly Federal Withholding Tax table, to determine the amount of FWT to withhold. The weekly tax tables for 2015 are shown in Figure 12-22. Each table contains five columns of information. The first two columns list various ranges, also called brackets, of taxable wage amounts. The first column (Over) lists the amount that a taxable wage in that bracket must be over, and the second column (But not over) lists the maximum amount included in the bracket. The remaining three columns (Base amount, Percentage, and Of excess over) tell you how to calculate the tax for each range. For example, assume that you are single and your weekly taxable wages are $246.20. Before you can calculate the amount of your tax, you need to locate your taxable wages in the first two columns of the Single table. Taxable wages of $246.20 fall within the $222 through $764 bracket. After locating the bracket that contains your taxable wages, you then use the remaining three columns in the table to calculate your tax. In this case, you calculate the tax by first subtracting 222 (the amount shown in the Of excess over column) from your taxable wages of 246.20, giving 24.20. You then multiply 24.20 by 15% (the amount shown in the Percentage column), giving 3.63. You then add that amount to the amount shown in the Base amount column (in this case, 17.80), giving $21.43 as your tax. The calculations are shown in Figure 12-21 along with the calculations for a married taxpayer whose weekly taxable wages are $1,659.50. 

c. If necessary, create a new project named Advanced29 Project and save it in the Cpp8\Chap12 folder. Enter your C++ instructions in a new source file named Advanced29.cpp. Store each tax table in its own two-dimensional array. Be sure to enter appropriate comments and any additional instructions required by the compiler. Test the program appropriately 

Taxable wage calculation Gross wages $ 400.00 - 153.80 (2 withholding allowances * 76.90) Allowances Taxable wages $ 246.20 Single with weekly taxable wages of $246.20 Taxable wages Of excess over $ 246.20 - 222.00 Married with weekly taxable wages of S1.659.50 Taxable wages Of excess over $ 1,659.50 -


Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: