Question: c++ code please #include #include #include using namespace std; // Type the declaration of each user defined function int main() { int wages, interest, unemployment,status,

c++ code please
#include
#include
#include
using namespace std;
// Type the declaration of each user defined function
int main() {
int wages, interest, unemployment,status, withheld;
int tax, agi, due, deduction, taxable;
// Step #1: Input information
/* Complete the input information */
// Step #2: Calculate AGI
agi = CalcAGI(wages, interest, unemployment);
cout
// Step #3: Calculate deduction
/* Complete the function call and output result */
// Step #4: Calculate taxable
/* Complete the function call and output result */
// Step #5: Calculate tax
/* Complete the function call and output result */
// Step #6: Calculate tax due
/* Complete the function call and output result */
return 0;
}
// Calculate AGI and repair any negative values
int CalcAGI(int wages, int interest, int unemployment) {
/* Complete the function and update the return statement */
return -1;
}
// Calculate deduction depending on single, dependent or married
int GetDeduction(int status) {
/* Complete the function and update the return statement */
return -1;
}
// Calculate taxable but not allow negative results
int CalcTaxable(int agi, int deduction) {
/* Complete the function and update the return statement */
return -1;
}
// Calculate tax for single or dependent
int CalcTax(int status, int taxable) {
/* Complete the function and update the return statement */
return -1;
}
// Calculate tax due and check for negative withheld
int CalcTaxDue(int tax, int withheld) {
/* Complete the function and update the return statement */
return -1;
}
c++ code please #include #include #include using namespace std; // Type the
declaration of each user defined function int main() { int wages, interest,
unemployment,status, withheld; int tax, agi, due, deduction, taxable; // Step #1: Input
Program Specifications Write a program to calculate U.S, 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: \( \$ " \ll \)quot; deduction end 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 1. Within main0 input wages, taxable interest, unemployment compensation, status ( 0= =dependent, 1= single, and 2=married), and taxes withheld as integers. Step 2 (2 pts). Complete the CalcAGIO) 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: 20000235001400 The output is: AGI: $20523 Step 3 (2 pts). Complete the GetDeduction( function. Return the deduction amount based on status: (0) dependent = 6000 , (1) single = 12000 , or (2) married=24000. Return 6000 if the status is anything but 0,1 , or 2 . Within main0 call GetDeduction0 and output the returned value. Submit for grading to confirm four tests pass. Ex: If the input is: 20000235001400 The additional output is: AGI:$20523Deduction:$12000 Step 4 (2 pts). Complete the CalcTaxable0 function. Calculate taxable amount (AGl-deduction). Set taxable to zero if calculation results in negative value. Return taxable value. Within main0 call CalcTaxable0 and output the returned value. Submit for grading to confirm six tests pass. Ex- If the input is: 20000235001400 The additional output is: AGI : $20523 Deduction: $12000 Taxable income: $8523 Step 5 (2 pts). Complete the CalcTax0 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 round0, and converted to an integer before returning. Within main() call Calc Tax() and output the returned value. Submit for grading to confirm eight tests pass. Ex: If the input is: Step 6 (2 pts). Complete the CalcTaxDue0 function. Set withheld parameter to zero if negative to correct potential input error. Calculate and return amount of tax due (tax - withheid). Within main0 call CalcTaxDue() and output returned value. Submit for grading to confirm all tests pass. Ex: If the input is

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 Databases Questions!