Bank Class
This is a modified version of this bank assignment
The responsibilities of this class are to
- manage an Array of Accounts that could be any kind of account
- add an Account (of any type)
- remove an account by
- account id
- owner (a Person object)
- Methods
-
Person[] topAccountOwners(int number )
- this method returns the top number owners with the greatest amount of cash in 1 account
- ** boolean binarySearch( int accountNumber) // this method should implement the binary search algorithm to determine if the account acct exists . Note for binary search to work, what must be true?
- ** extra credit
Account[] sortByAccountId()
- this method returns an array of Accounts sorted by amount in the account
-
Person[] topAccountOwners(int number )