This midterm project is meant to utilize the skills that you acquired over the first half of the semester. You have been contracted by a small-town bank that would like for you to implement a custom software system for managing bank accounts and transactions. As a prototype you decided to show them a menu driven example. Your menu driven example has the following menu:
Bank Login Menu
A) Log into an account
B) Open a new account
C) Remove an account
D) Show all accounts
E) Exit System
After a user has successfully logged in, then following menu should show:
A) Show account balance
B) Make a deposit
C) Make a withdrawal
D) Write a Check
E) Show all transactions
F) Logout of an account
If the user logs out of the system, then the login menu should be shown again.
Your software is designed using at least three classes: Account, Transaction, Deposit(inherits from Transaction), Withdrawal(inherits from Transaction), and Check(inherits from Transaction).
The Account class represents a single bank account and keeps track of at least this data:
The Account class has at least the following responsibilities:
The Transaction class represents a single transactions and keeps track of at least this data:
The Transaction class has at least the following responsibilities:
Remember that the transactions for checks, deposits, and withdrawals inherit from the transaction class. You must decide whether you want this to be a base class or abstract base class.
Your bank account program will be based on performing the activities of the menu. You will use an external file to keep track of the bank account numbers and their passwords. This way bank accounts can be created and then logged into later. In addition, no menu operations should work unless an account has been logged into and is validated. This file should be called allaccounts.txt and is formatted as follows:
< Account Number> < First Name> < Last Name> < Password> < Balance>
Each line of the file contains one bank customer with the above information. This information must be saved between uses of the program. The file should be read into into an array of objects when the program starts, and when the program is being exited (option D) the program should then write the data from the array of objects back to the file. This will overwrite the file entirely. Do not have a program that is always updating and reading the file with every change. Changes that occur during the program execution should only be effected in the array of objects. You should not be using the random access file techniques found in Chapter 12.
Transactions are maintained on a session-by-session basis. This means that once you log in, each transaction you perform is tracked for that session. So if you were to make a deposit, write two checks, and make a withdrawal then you should use show transactions to show you those four transactions. However, once you log out the transactions are removed.
Logging out of an account should not exit the program. It only means that a successful login to some account must be made before more transactions can occur.
Notice that the requirements are minimal requirements. This is because the bank management had some basic requirements. But as a software developer, you may see the need to add data and/or features.
Do you want to "wow" the bank managers? Try this
Extra Credit: Currently, there is not a requirement to save transactions between login sessions. Ultimately, you would like to do this for the bank that is contracting you. So if you have time, then you can add this feature to your prototype to really show your skills. You will need to come up with a systematic file organization for transactions and the menu option that displays all transactions should now display all transactions since the creation of the account and not just the session. Will there be one file for all transactions? How will all the transactions be stored in the file in a logical manner? How will it be updated? will you have one file of transactions per account holder? How will those transactions be organized within the file? How will the file be updated? or will you have some other scheme? These are questions that you are wrestling with for this feature.