Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Can you guys help writing the code for this project?(comments help a lot) thanks

ID: 3646517 • Letter: C

Question

Can you guys help writing the code for this project?(comments help a lot) thanks in advance!

Description: In this project, you will combine the experience from previous assignments and projects to create your largest program. You will also gain experience using vectors, reading and writing files, and formatting output.

Details: Write a program to simulate a simple banking system.

Your first task is to create a class called Account. This class will store a person's account ID, passcode, last name, first name, and balance.

For your second task, you will create a class called BankingSystem. This class must have at least the following functionality:

Add a new account.
Delete an existing account.
Inquire on an existing account (or all accounts).
Save accounts to a file.
Load accounts from a file.

BankingSystem must also use a private data member that is declared as follows:

std::vector<Account> accounts_;

Your third task will be to develop a driver program. The driver program will print some type of menu allowing the user to choose the option they want. Instead of using a BankingSystem object, you must use a pointer to a BankingSystem object with the new operator. Your book describes this operator on pages 476-477. So, in your driver program (in main()), you would write the following:

BankingSystem* myBankingSystem = new BankingSystem();

At the end of your program (end of main() before returning), you have to free this memory explicity by writing the following:

delete myBankingSystem;

Unlike previous assignments and projects, this one is very open-ended. Besides my explicit requirements, you are free to make your own design decisions. But, remember to use good programming practices such as those pertaining to formatting, commenting, multiple inclusion guards, and file organization (i.e. header, implementation, driver). My sample runs will give you a model you can follow for your driver program.

Programming Tips: This project rolls everything together into one. So, it is important to know the concepts from the previous assignments and projects. It may be helpful to create one function at a time in BankingSystem and test it before proceeding. Remember from the chapter on arrays that a vector is really just a "better" array. Vector's can make life easier than arrays for tasks like searching, adding, and removing items. For adding an account, you will find the push_back() function useful. For removing an account, you will find the erase() function useful.

Sample Output:

*** Welcome to the Banking System ***

(1) Add Account
(2) Delete Account
(3) Account Inquiry
(4) Save Accounts to File
(5) Load Accounts from File
(6) Exit

Enter selection: 1

Enter the accountID: 1
Enter the passcode: 1
Enter the first name: Yosemite
Enter the last name: Sam
Enter the starting balance: $2.45

Account added successfully.

(1) Add Account
(2) Delete Account
(3) Account Inquiry
(4) Save Accounts to File
(5) Load Accounts from File
(6) Exit

Enter selection: 1

Enter the accountID: 2
Enter the passcode: 2
Enter the first name: Bugs
Enter the last name: Bunny
Enter the starting balance: $2.50

Account added successfully.

(1) Add Account
(2) Delete Account
(3) Account Inquiry
(4) Save Accounts to File
(5) Load Accounts from File
(6) Exit

Enter selection: 1

Enter the accountID: 3
Enter the passcode: 3
Enter the first name: Daffy
Enter the last name: Duck
Enter the starting balance: $45.00

Account added successfully.

(1) Add Account
(2) Delete Account
(3) Account Inquiry
(4) Save Accounts to File
(5) Load Accounts from File
(6) Exit

Enter selection: 3

Enter the account ID (-1 for all): -1

Account ID Passcode Last Name First Name Balance
================================================================
1 1 Sam Yosemite 2.45
2 2 Bunny Bugs 2.50
3 3 Duck Daffy 45.00

(1) Add Account
(2) Delete Account
(3) Account Inquiry
(4) Save Accounts to File
(5) Load Accounts from File
(6) Exit

Enter selection: 4

Enter the filename: bankaccounts.txt

File bankaccounts.txt saved successfully.

(1) Add Account
(2) Delete Account
(3) Account Inquiry
(4) Save Accounts to File
(5) Load Accounts from File
(6) Exit

Enter selection: 2

Enter the accountID: 1

Account erased.

(1) Add Account
(2) Delete Account
(3) Account Inquiry
(4) Save Accounts to File
(5) Load Accounts from File
(6) Exit

Enter selection: 2

Enter the accountID: 2

Account erased.

(1) Add Account
(2) Delete Account
(3) Account Inquiry
(4) Save Accounts to File
(5) Load Accounts from File
(6) Exit

Enter selection: 2

Enter the accountID: 3

Account erased.

(1) Add Account
(2) Delete Account
(3) Account Inquiry
(4) Save Accounts to File
(5) Load Accounts from File
(6) Exit

Enter selection: 3

Enter the account ID (-1 for all): -1

Account ID Passcode Last Name First Name Balance
================================================================

(1) Add Account
(2) Delete Account
(3) Account Inquiry
(4) Save Accounts to File
(5) Load Accounts from File
(6) Exit

Enter selection: 5

Enter the filename: bankaccounts.txt

File bankaccounts.txt loaded successfully.

(1) Add Account
(2) Delete Account
(3) Account Inquiry
(4) Save Accounts to File
(5) Load Accounts from File
(6) Exit

Enter selection: 3

Enter the account ID (-1 for all): -1

Account ID Passcode Last Name First Name Balance
================================================================
1 1 Sam Yosemite 2.45
2 2 Bunny Bugs 2.50
3 3 Duck Daffy 45.00

(1) Add Account
(2) Delete Account
(3) Account Inquiry
(4) Save Accounts to File
(5) Load Accounts from File
(6) Exit

Enter selection: 6

Add the ability to withdraw money from an account (5 points).
Add the ability to deposit money into an account (5 points).

Explanation / Answer

z