Question
Please code in C++. The header file, function file, and main file are included at the bottom. Please follow the format provided. A sample output
Please code in C++. The header file, function file, and main file are included at the bottom. Please follow the format provided. A sample output can be provided as well.
Our goal in this project is to create a simple banking system which allows a banker to manage different bank accounts. As a banker, you would create new accounts, deposit to an account, withdraw from an account, transfer money from one account to another, delete account, sort the accounts, or do inspection on one or all bank accounts. In order to do this job, you would need the tool for each of those items. The bank maintains a list of accounts. Write a program in C++ to meet the above requirements. The list of account has to be available as long as you run the program. This means the list of the account has to be initialized in the main() function. Write a function for each of the items above. You will call these functions to perform any task on the bank accounts. Each account will have account number, name (last, first), balance and status (active/deactive). The header file, function file, and main file are as the sample below. All functions are of type void. You will fill in the necessary function parameters. In order to do this project, you would need to understand pointers, functions, and vectors among other basic C++ knowledge. You will follow the exact requirement and format of the program. Any unnecessary changes will result in points taken off.
// header_file.h # include
// function_file.cpp # include header_file.h void menu(int *num) { int select = 0; cout << "Welcome! Select options below:" << endl; cout << "\t1. Make new account." << " \t2. Deposit to an account." << " \t3. Withdraw from an account."<< " \t4. Transfer money." << " \t5. Print account." << " \t6. Activate/Deactivate an account."<< " \t7. Delete an account." << " \t8. Display all accounts." << " \t9. Quit." << endl; cout << "Selection:\t"; cin >> select; *num = select; }
// main_file.cpp
# include header_file.h int main() { // declare list of account here. The size of the list is not fixed. int input = 0; menu(&input); // run loop to continue program until terminated by user switch (input) { // cases: call functions to perform tasks } return 0; }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started