Computer Science (CSCI) Department
College of Engineering, Computer Science, & Technology (ECST)

JETT Workshops
Object-Oriented Programming

Fall 2004


ArrayList & Arrays

(Example code and figures from Computing Concepts with Java Essentials, 3rd edition, by Cay Horstmann.
Visit www.wiley.com/college/horstmann for information on the current edition of this excellent text.)

 

Exercise - implement a Bank class

  • use the BankAccount project to start
  • implement a new class Bank
    • use ArrayList to keep track of accounts
    • implement some methods
      • add new account
      • delete account
      • get balance of account - need ID
      • deposit in account - need ID
      • withdraw - need ID
      • get total funds in bank - all accounts
      • anything else that sounds interesting!
  • modify AccountTest to test new code
  • can you diagram this program in UML?