Write a loop-based menu driven complete C++ application (that will run without errors or warnings!) that uses an input file to process the external file, "BankAccounts.txt". The application will continue to run until the loop termination condition is selected. Prior to entering the loop, the application must read all records from the file. Within the loop the application must display a menu that gives the user the option to call one of the “Display...” functions or exit the loop. After the loop, the application will output the total balance of all the accounts (i.e., total for all savings, checking and money market accounts).The external file BankAccounts.txt includes a record for each account and contains the following information (each field separated by colon) Customer ID First Name Last Name Street Address Check Account Balance Money Market Balance Saving Account Balance The application must read the file of records and store the information in an array of structures (maximum size of the array will be 100 entries). Therefore, the
Write a loop-based menu driven complete C++ application (that will run without errors or warnings!) that uses an input file to process the external file, "BankAccounts.txt". The application will continue to run until the loop termination condition is selected. Prior to entering the loop, the application must read all records from the file. Within the loop the application must display a menu that gives the user the option to call one of the “Display...” functions or exit the loop. After the loop, the application will output the total balance of all the accounts (i.e., total for all savings, checking and money market accounts).The external file BankAccounts.txt includes a record for each account and contains the following information (each field separated by colon) Customer ID First Name Last Name Street Address Check Account Balance Money Market Balance Saving Account Balance The application must read the file of records and store the information in an array of structures (maximum size of the array will be 100 entries). Therefore, the application must be designed to support a file that contains a maximum of 100 accounts. The number of accounts must be specified as a constant declaration. This constant must be used in the code everywhere the size of the array is required. The application must have functions that perform the following. DisplayAccounts – displays all the account records, sorted by Customer ID. This is a void function with 2 formal parameters (i.e., array of structures & number of array elements) DisplaySavingsAccounts – displays all the account records with a savings account balance greater than 0, sorted by Customer ID. This is a void function with 2 formal parameters (i.e., array of structures & number of array elements) DisplayCheckingAccounts – displays all the account records with a checking account balance greater than 0, sorted by Customer ID. This is a void function with 2 formal parameters (i.e., array of structures & number of array elements) DisplayMoneyMktAccounts – displays all the account records with a money market account balance greater than 0, sorted by Customer ID. This is a void function with 2 formal parameters (i.e., array of structures & number of array elements) TotalBalanceAccounts – calculates the total of all account balances for all customer savings, checking and money market. The function declaration is below. double TotalBalanceAccounts (double arr[], int accts); Note: Initialize all member variables. 1. The application must read all records of the file by using the technique of testing for the end-of-file (i.e., cannot prompt user for the number of records in the file). In addition, the application must be designed to handle strings that contain spaces. 2. The “Display...” functions are only required to display the pertinent money values (e.g., “DisplaySavingsAccounts” does not display money market or checking amounts).
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images