Due March 13, 1999 at the beginning of class.Please turn in your source code and an example print run from Part B.
Part A:
Expand the BankAccount object to also store a password (with getters and setters).
Part B:
Make a bank object that holds up to 200 accounts in an array.Provide the following functions for the bank:
Note that when you have no accounts, each slot in the array will be contain 'null', and not an actual BankAccount object. You will have to test for this if you don't keep track of how many BankAccounts you have at any given time.
- createNewAccount
Requires a name, password, and initial balance: the bank can supply the interest rate.- findAccountByName
Requires a name.
Returns a reference to the BankAccount object which has the given name.- findAccountByNameAndPassword
Requires a name and a password.
Should use the findAccountByName function.
Returns a reference to the BankAccount with the given name if the password is correct.- monthlyUpdate
Returns the total amount of interest the bank paid out.- averageBalance
Returns the average balance of the accounts in the bank.- medianBalance
Returns the median (middle) balance of the accounts.
- lowBalance
Returns the lowest balance.- highBalance
Returns the highest balance.Create a main that adds a bunch of accounts (at least four or five) to the bank, runs monthly updates for a few years (complaining about the interest it's paying out each month), and giving the bank statistics at the beginning and end of the two year time period.
The views and opinions expressed in this page are strictly those of the page author.
The contents of this page have not been reviewed or approved by the University of Minnesota.