Lab 3 Spring 2001

Introduction

You are asked to convert a bank program from a file oriented program to a database program. You will not be required to convert existing accounts to the new database form, so you can test with the empty database provided in the zip file.

The Database Design

The database is designed so that the account number is contained in the AccountTable. All savings accounts and checking accounts will use this id as identification in the associated tables for each type of account. This relationship is given in the image below.

What Do You Have to Do

  1. You will have to add the place and retrieve functions to all classes.
  2. You may need to the constructors to accommodate the fact that the ids are set after new accounts are inserted into the database.
  3. You may need a way to set the account Id so you can record it after you have added an object to the database. You may actually be able to "grab" the id when you do place.
  4. You will want a function that just changes the budget in the database (rather than reinserting the whole thing)
  5. You may need a createFromDB to get the values for one item.
  6. You should update all records when the changes take place as opposed to when the program ends as currently occurs.

Get the shell by clicking here . It is a shell since I haven't actually made the changes. I apologize for the hard-wired account dialog, but time was of the essence in getting this out.