If possible, the program should make use of functions, value returning functions
ID: 3647536 • Letter: I
Question
If possible, the program should make use of functions, value returning functions, one- and two-dimensional arrays, user-defined data types, structs,
The primary objective of the solution is to compute federal personal income taxes. The solution can have NO global variables. The tax liability depends on how much money one makes as well as their filing status. For our purposes we will use four filing statuses. These are (1)single filers, (2)married filing jointly, (3)married filing separately, and (4)head of household.
Tax Rate
Single Filers
Married Filing Jointly
Married Filing Separately
Head of Household
10%
Up to $7,550
Up to $15,100
Up to $7,550
Up to $10,750
15%
$7,551-$30,650
$15,101-$61,300
$7,551-$30,650
$10,751-$41,050
25%
$30,651-$74,200
$61,301-$123,700
$30,651-$61,850
$41,051-$106,000
28%
$74,201-$154,800
$123,701-$188,450
$61,851-$94,225
$106,001-$171,650
33%
$154,801-$336,550
$188,451-$336,550
$94,226-$168,275
$171,651-$336,550
35%
$336,551 or more
$336,551 or more
$168,276 or more
$336,551 or more
For each filing status there are six tax rates. Each rate is applied to a given amount of the taxable income. For example, for a taxable income of $450,000 for a single filer, $7,550 is taxed at 10%, ($30,650-$7,550) at 15%, ($74,200-$30,650) at 25%, ($154,800-$74,200) at 28%, ($336,550-$154,800) at 33%, and ($450,000-336,550) at 35%.
The six tax rates are to be stored in a one-dimensional array with data type float. The four filing status descriptions are to be stored in a one-dimensional array of data type string..
Variables
Name
Type
Description and edit specifications
statusCode
int
Status code must be from 1 to 4. 1=single, 2=married filing jointly, 3=married filing separately, 4= head of household, 9 = end processing.
taxableIncome
float
Taxable income is entered by the user from the keyboard. The amount must be numeric and not less than $500.
taxAmt
float
taxAmt is a calculated field and is determined from the supplied tax table as applied to the taxableIncome.
taxRate[6]
float
6 tax rates with amounts specified in the above table.
filingStatus[4]
string
4 filing status descriptions as shown in the above table.
Your program should be modular and contain at least 4 user defined functions beyond the main() function. You are to follow these specifications as closely as possible. You should have functions that do the following:
Functions
Description and specifications
main()
main() should be concise and drive the execution of the solution. The primary loop should be a while loop that repeats the steps necessary to display the results until the user enters a status code of 9 that will terminate the job.
getStatusCode
This function is to input the filing status code. This is to be a return by value function. You should use a do/while loop to control the input logic. You are to keep the user in the loop until the input is correct. You are to ensure that the status codes are as specified above.
getTaxIncome
This function is to input taxable income and is a return by value function. You are to use a do/while loop for this logic. You are to keep the user in the loop until the input is valid.
calcTaxAmt
This function is to calculate the taxAmt as determined by statusCode and taxableIncome. This is a return by value function.
displayResults
The role of this function is to display the program
Tax Rate
Single Filers
Married Filing Jointly
Married Filing Separately
Head of Household
10%
Up to $7,550
Up to $15,100
Up to $7,550
Up to $10,750
15%
$7,551-$30,650
$15,101-$61,300
$7,551-$30,650
$10,751-$41,050
25%
$30,651-$74,200
$61,301-$123,700
$30,651-$61,850
$41,051-$106,000
28%
$74,201-$154,800
$123,701-$188,450
$61,851-$94,225
$106,001-$171,650
33%
$154,801-$336,550
$188,451-$336,550
$94,226-$168,275
$171,651-$336,550
35%
$336,551 or more
$336,551 or more
$168,276 or more
$336,551 or more
Explanation / Answer
hope Income Tax Calculation program in c++ will be helpful #include #include #include #include //==========================Base Class========================// class iTax { public: char name[90],ads[90],occ[90]; int ID; void getit(char *a) { strcpy(occ,a); coutRelated Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.