Question: 6 . 2 1 LAB * : Program: Income tax form - functions Program Specifications Write a program to calculate U . S . income
LAB: Program: Income tax form functions
Program Specifications Write a program to calculate US income tax owed given wages, taxable interest, unemployment compensation, status dependent single, or married and taxes withheld. Dollar amounts are displayed as integers without comma separators. For example, cout "Deduction: $ deduction endl;
Note: this program is designed for incremental development. Complete each step and submit for grading before starting the next step. Only a portion of tests pass after each step but confirm progress.
Step Within main input wages, taxable interest, unemployment compensation, status dependent, single, and married and taxes withheld as integers.
Step pts Complete the CalcAGI function. Calculate the adjusted gross income AGI that is the sum of wages, interest, and unemployment. Convert any negative values to positive before summing to correct potential input errors. Return the AGI. Note the provided code in main calls CalcAGI and outputs the returned value. Submit for grading to confirm two tests pass.
Ex: If the input is:
The output is:
AGI: $
Step pts Complete the GetDeduction function. Return the deduction amount based on status: dependent single or married Return if the status is anything but or Within main call GetDeduction and output the returned value. Submit for grading to confirm four tests pass.
Ex: If the input is:
The additional output is:
AGI: $
Deduction: $
Step pts Complete the CalcTaxable function. Calculate taxable amount AGI deduction Set taxable to zero if calculation results in negative value. Return taxable value. Within main call CalcTaxable and output the returned value. Submit for grading to confirm six tests pass.
Ex: If the input is:
The additional output is:
AGI: $
Deduction: $
Taxable income: $
Step pts Complete the CalcTax function. Calculate tax amount based on status and taxable income see tables below Tax amount should be stored initially as a double, rounded to the nearest whole number using round and converted to an integer before returning. Within main call CalcTax and output the returned value. Submit for grading to confirm eight tests pass.
Ex: If the input is:
The additional output is:
AGI: $
Deduction: $
Taxable income: $
Federal tax: $
Income Tax for Dependent or Single Filers
$ $ of the income
$ $ $ of the amount over $
$ $ $ of the amount over $
over $ $ of the amount over $
Income Tax for Married Filers
$ $ of the income
$ $ $ of the amount over $
over $ $ of the amount over $
Step pts Complete the CalcTaxDue function. Set withheld parameter to zero if negative to correct potential input error. Calculate and return amount of tax due tax withheld Within main call CalcTaxDue and output returned value. Submit for grading to confirm all tests pass.
Ex: If the input is:
The additional output is:
AGI: $
Deduction: $
Taxable income: $
Federal tax: $
Tax due: $
PLEASE ANSWER WITH THE ENTIRE CODE NEEDED TO COMPLETE THE LAB, ALTOGETHER
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
