using CODE BLOCK C++ only , please do the software below: An IRS agent is checki
ID: 3666674 • Letter: U
Question
using CODE BLOCK C++ only , please do the software below:
An IRS agent is checking taxpayer’s returns in the $30,000.00 to $40,000.00 income bracket (gross earnings). Each record of the data file contains a tax identification number (four digits), gross earnings, and the amount of taxes paid for the year. If the taxes paid are below 20.5% of the gross earnings, you are to compute the taxes due (assume all taxes are in the bracket of 20.5% of gross earnings). If there are taxes due a penalty charge of 4% is added to the amount. If the taxes due exceed $1,300.00 an additional 2.0% penalty charge is added to the amount over $1,300.00. For those that paid more than the 20.5%, compute the refund due and leave a message to that effect. Records of gross earnings outside the range of $30,000.00 to $40,000.00 are not checked and an appropriate message must be printed to that effect. Your program must also generate a summary report containing the following information: 1. The total number of records in the data file. 2. The total number of taxpayer’s checked in range. 3. The total number of taxpayer’s receiving refunds. 4. The total dollar amount refunded. 5. The total number of taxpayer’s that owe taxes. 6. The total dollar amount of taxes due. 7. The total dollar amount of penalties due. 8. The average dollar amount refunded. 9. The average dollar amount of taxes due. 10. The average dollar amount of the penalties due. Note: You must use functions for the following: 1. The headings. 2. One function to compute the averages. (called three times) 3. Print the summary report. 4. Other functions may be used were you deemed appropriate. Submit your source code and algorithm or flowchart in blackboard. All values must be clearly labeled in the output. You are required to demonstrate your output in Lab. The data file: IRSDATA.TXT can be found in blackboard under Assignment 4 materials. Documentation will be 20% of your grade. Your source code must contain the following documentation. 1. Header information: (Source Code and Output) Your Name, course & section number, assignment number and due date. 2. A brief description of your assignment. 3. Variable dictionary: A brief description of every variable used in your program. 4. Comments related to input and output of data and all formulas used in your code.
Explanation / Answer
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 #include #include using namespace std; void heading(); void averagepaid(); int main() { int counter = 0, idno = 0; double income = 0.0, tax = 0.0; ifstream f1 ("h:\fall 2014\irsdata.txt",ios::in); heading(); while (f1>>idno>>income>>tax, !f1.eof()) { counter++; coutRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.