question archive Computer Science Records Write-a C++ program that can open and read data from any external data file and then display that data on the screen for viewing in the desired format
Subject:Computer SciencePrice: Bought3
Computer Science
Records
Write-a C++ program that can open and read data from any external data file and then display that data on the screen for viewing in the desired format. The data file contains customer information for a fictional company's records. The maximum number of records could be up to 1000 employees. From the file, in each row, there is an ID number, a name and the balance due related to that specific customer. The display the program needs to output should be formatted in this particular order: ID (to be sorted in ascending order), Name, balance (from the data input file), and 15% of that balance for each customer (to be calculated by the program) in a single row.
Lastly, the data displayed on-screen should also be written out to another data file for recording purposes (all columns should be aligned, and floating-point values should have precision set to 2, with 2 digits after the dot). Both data files are text files that could be read from Notepad, and their names must be allowed to enter at the run time of the program. Allow to have more than one word for the filenames (this is a mandatory).
Please see the examples below for formatting details -
In the data file to be read in, the data will look like the following:
77234 Ashley White# 4563.50
12345 Brad Smith# 128923.45
87123 Lisa Johnson# 2345.93
Then, on the screen and in the file to be saved for recording purposes, the data should look like the following:
12345 Brad Smith 128923.45 19338.52
77234 Ashley White 4563.50 684.52
87123 Lisa Johnson 2345.93 351.89