Question: please answer in C++ code Programming Assignment 2 File IO Control structures Looping Operator precedence Error checking (bad data, file stream fail state, etc.) Use


please answer in C++ code
Programming Assignment 2 File IO Control structures Looping Operator precedence Error checking (bad data, file stream fail state, etc.) Use of proper data types Exact output Write a program that can be used to create a detailed billing report for a company that provides tax consultations for customers 1. The information will be in the provided data file customers.txt. The data file consists of several rows of ata, as follows (commas are not in the file): Customer First Initial, Customer Last Name, Customer ID Yearly Income, Consulting Time in Minutes, Consulting Agent ID 2. Request the name of the input file from the user. Do not 3. Read the file using a looping construct that checks for the 4. The agent ID maps to an agent last name and hourly rate. "hard-code" the file name in the program. end of file (not the number of rows in the data file). Evaluate the agent ID using a SWITCH statement to retrieve the agent last name and hourly rate. The mapping values are as follows. You will use these as constants/literals in your program: Agent ID 1 Bortles; Hourly Rate 65.00 Agent ID 2 Cower, Hourly Rate 70.00 Agent ID 3 Watt; Hourly Rate 75.00 Any other agent ID is an error and needs to be handled accordingly. See Error Handling below. 5. Determine if the customer is a low income customer and set a flag accordingly (Y or N). This is to be output in the report (see below) and may be used for calculating the customer's amount due (bil). A customer is low income if the yearly income is less than or equal to $25,000 6. Calculate the customer's amount due (bill) as follows: If the customer is a low income customer If the consulting time is less than or equal to 30 minutes, the amount due (bill) is 0.00 If the consulting time is greater than 30 minutes, the amount due (bill) is 40% of the hourly rate (billing rate) times (the consulting time minus 30 minutes) divided by 60 minutes (i.e., billed by the hour). For example, if the consulting time is 32 minutes the calculation would be
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
