Question: Write a C++ Program that does the following: PRECONDITION: LIST size will always be 10 people. As you can see, there is a file named
Write a C++ Program that does the following: PRECONDITION: LIST size will always be 10 people. As you can see, there is a file named "invoice1_test1.txt". You are to use this file as your input file for your program.
Do the following: 1. Sort the file by last name using an array. You can use any of the sorting algorithms that is posted on moodle. You may use the string data type to store text data. NOTE:* If you decide to use the string data type, I will be unavailable for any assistance.
2. Compute the following: a. The total balance due using the BalanceDue column. b. Find the customer(s) with the highest number of rental days. c. Find the customer(s) with the highest balance due.
The OUTPUT file that is listed on the left pane, shows an example of the output that should be printed. Make sure you print the output to a file, and not to the console.
invoice1_test1.txt:
LastName FirstName DaysofRental BalanceDue
Smith Joe 15 150.50
Doe John 10 95.20
Anderson Paul 30 20.00
Odonell Miriam 10 24.30
Foster Sam 30 15.00
Zom Pete 10 20.00
Mock Chilly 100 30
Smitty Chris 200 200
Xu Conor 1 200
Anilo Steve 0 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
