Question: Problem 4 : Bank Account Report Generator Only use Iostream# , fstream# and maniop# You are given a text file named accounts.txt containing information about

Problem 4: Bank Account Report Generator Only use Iostream# , fstream# and maniop#
You are given a text file named accounts.txt containing information about several customers' bank accounts. Each line in the file represents a single customer's account details with the following format:
AccountID FirstName LastName InitialBalance
Write a C++ program that reads this file and then performs a series of operations on each account based on another input file named transactions.txt. This file contains a series of transactions to be applied to the accounts, formatted as follows:
AccountID TransactionType Amount
Where TransactionType is either D for deposit or W for withdrawal. See sample content of transactions.txt file.
After processing all transactions, the program should generate an output report named report.txt that lists the final balance of each account, including the account ID, the customer's name, and the final balance, formatted like the original input. Check sample output. All input files are given.
accounts.txt content:
\table[[1001,Ahmed Al-Ali 1250.50],[1002,Fatma Al-Jamil 15000.75],[1003 Mariam Al-Mohmoud 2000.00,],[1003 Jamal Ibrahim 1750.00,],[1003 Salem Alsalem 950.50,]]
transaction.txt content:
\table[[1001 D 1000.00],[1002 W 200.75],[1003 D 250.00],[1001 W 800.00],[1004 D 450.50],[1005 W 200.00],[1005 D 450.50]]
report.txt content:
\table[[Acc ID,F-Name,L-Name,Balance],[=====,=====,====,======
 Problem 4: Bank Account Report Generator Only use Iostream# , fstream#

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!