Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

WHAT I NEED IS ONLY AN ARRAY THAT WOULD ALLOW THE USER TO CHOOSE BETWEEN USING T

ID: 3604483 • Letter: W

Question

WHAT I NEED IS ONLY AN ARRAY THAT WOULD ALLOW THE USER TO CHOOSE BETWEEN USING THE STANDARD DEDUCTION METHOD OR THE ITEMIZED METHOD TO FILE THEIR TAXES. THIS IS THE ONLY CODE SECTION THAT HAS TO BE MODIFIED BUT I DONT KNOW HOW TO DOIT

///// input deductions ////

double inputDeductions(int taxpayerStatus)

{

double deductions;

cout << "Enter the amount of your Itemized Deductions: ";

cin >> deductions;

return deductions;

}

Any information needed is in the description, the sample code and the taxpayer status standard deduction table

PROJECT DESCRIPTION:When people fill out their tax return, they have the option of itemizing their deductions or using a standard deduction. If people are buying a house and have a mortgage, have donated a lot of money to charities, have high medical bills or other deductions, it may be better to itemize and list all their deductions. For many people it may be better to take the 'standard deduction' The program should ask for the following information in this order: a) Tax status - single, married filing jointly, etc.b) Number of exemptions (people you can claim on your taxes 1, 2, 3, etc.)c) Total income in dollarsd) Select either standard deduction or itemized deduction 1.

If the standard deduction is selected, the amount is to be looked up from an array. The array is to filled with the data shown in the table below. 2. If the itemized deduction is selected, the dollar amount of the deduction is to be read from the keyboar a) Income in dollarsb) -Exemptions in dollarsc) -Deductions in dollarsd) Taxable income e) Computed tax in dollars (from the tax tables)f) -Amount withheld in dollars (usually from the W2 from your employer)g) Refund or amount owed in dollars When all the data has been collected, the program displaysI have completed most of the code for the Tax Estimator project. The program needs to be updated to ask if the the user wants to itemize or use the standard deduction. If the user selects to itemize, then the program is to ask for the itemized deductions. If the user selects the standard deduction, then the program looks up the amount of deduction from an array, based on the filing status (single, married, etc.) The project currently allows the user to input the amount of the itemized deductions, but the program has not been completed to use the standard deductions. If the standard deduction option is selected when running the program, the deductions should place the standard deductions in an array and look up the deduction from the array. The array is to be filled with the following data:

Taxpayer Status Standard Deduction
=========================================

Single 6300.00
Married filing jointly 12600.00
Married filing separately 6300.00
Head of Household 9250.00

Qualifying Widow(er) 12600.00

This is part of the code but I need the rest

Explanation / Answer

First the user want to choose the type of deduction only then it can be proceded with the next.So a choice from the user from which the user can choose;

int choice //global declaration
double std[]={6300,12600,6300,9250,12600};
double inputDeductions(int taxpayerStatus)
{
double deductions;
cout << "Enter the amount of your Itemized Deductions: ";
cin >> deductions;
cout<<"1.STANDARD DEDUCTION METHOD"<<endl;
cout<<"2.ITEMIZED METHOD"<<endl;
cout<<"Enter your choice"<<endl;
cin>>choice
//based on choice you can use your rest of the code.As the value is already in the array
return deductions;
}