REVIEW VIEW ?·?.LNormalliNoSpac Heading 1 Heading 2 Tele subtitle Subtle En. Emp
ID: 3915790 • Letter: R
Question
REVIEW VIEW ?·?.LNormalliNoSpac Heading 1 Heading 2 Tele subtitle Subtle En. Emphrs Intense e.. Styles 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: I 1. The information will be in the provided data file customers.txt. The data file consists of several rows of data, 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 "hard-code the file name in the program. 3. Read the file using a looping construct that checks for the end of file (not the number of rows in the 4. The agent ID maps to an agent last name and hourly rate. Evaluate the agent ID using a SWITCH data file) 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, Hourty 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 i 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 (bill). 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 followsExplanation / Answer
Solution contains 5 classes
1. Customer Class: which represents customer entity
2. Agent class represents agen.
3. Bill Class which comprised of Customer and Agent
4. Bill Generator Class, which do bill calculation and other manupulations
5. Main Class that takes input from user
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.