Question: Please help Array of Structs (c++) 1. Create a structure that contains the tax payer information, the tax rate, the income, and the taxes (all
Please help Array of Structs (c++)
1. Create a structure that contains the tax payer information, the tax rate, the income, and the taxes (all floats). This should be in an implementation file called taxPayer
2. Create an unnamed namespace that contains the constant size, for the size of the array
3. Create an array of these structs, called citizen.
4. Create a function called taxTaker that will accept the structure as a parameter. This function will take user information for each payer, up to the size of the array of structures. The function should take the inputs for the income and the tax rate elements, and then store the computation in the taxes element. This function should also use standard input validation and ensure the data is good (numeric), and that it falls with the range of 0.01 through 9.9 for rate, and income amounts are greater than zero.
5. Create a function called taxPrint that will accept the structure as a parameter input and print out the total taxes due for all the payers in the array to standard output. Make sure to format the output in accord with the sample output below. The output should be for dollar amounts. This will print for each payer, up to the size.
the output should look like this

C: CodeBlocks arrayofstructs Abin Debug WarrayotStructs exe Please enter the annual income and tax rate for 2 tax payers Enter this year's income for tax payer 1 60000 Enter the tax rate for tax payer 1: 7.5 Enter this year's income for tax payer 2 50000 Enter the tax rate for tax payer 2: 4.2 Taxes due for this year: Tax Payer 1 4500.00 Payer 2: 2100.00
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
