Last Lab 8, A Simpler Database -- Due 12/11/8


This lab is for people in danger of failing the course. It is a simpler version of the regular lab. It is easier to do, but the best grade you can get in the course if you do this one is a C.

Introduction

Every major bank supports ATM machines. These are basically small database clients equipped with a card reader, money dispenser, deposit slot, keyboard and screen. For this lab you will simulate a bank which can be accessed through such an ATM. Only allow two actions, withdrawals and displaying the balance. Please reread Chapter 3 if you have any questions about how to make an ATM and/or simulated Bank.

Your task

Write a program that will manage any number of bank accounts. Each account will have a name and a balance (use int for simplicity). Allow users to display their current balances and withdraw as much (simulated) money as they want with a graphical user interface (GUI).
  1. Store your database in memory in an ArrayList.
  2. Organize your program so that the GUI Frame contains only user interface code. That is, put all the database handling code in your own classes.
  3. When the program starts, read the contents of the database from a file into memory.
  4. Display all the users in a Choice; to select an Account for withdrawals or to check the balance select an account from the Choice
  5. Database manipulation; Allow the user to:
    1. display the entire database in a TextArea.
    2. add or delete a record

Problem solving advice

There are many different problem solving strategies that people employ when programming. Here, problem solving is the behavior that one engages in when one does not know how to proceed.

Some of the most common debugging strategies are:


Demo your lab for credit