CS 1620 Assignment #6 Summer I 1999

Due: Monday June 21, 1999 at midnight
Weight: 8%
Late Penalty: -20% per day late

Using the Bank, Branch and Account classes provided, along with the Controller and Main classes, use inheritance, polymorphism and an abstract class (Account), to write the following classes:
  1. chequing account -- which charges a $1.00 service charge for each withdrawal.
  2. chequing account with overdraft protection -- allows overdrafts (negative balances) up to $750 limit. There is a one time $5.00 service charge, on top of regular service charge, if the monthly balance is ever negative.
  3. savings account -- pays interest of 2.7% on the minimum monthly balance.
  4. bonus savings account -- pays a bonus 0.75% interest, on top of regular rate, if the monthly balance is always $1000 or more. In addition there is a $10 penalty fee charged for each withdrawal.
  5. points account -- 1 point is awarded for each dollar deposited when the account is opened. 1 point is awarded for each $10 deposited thereafter. The total points are printed with the account.

You will need to add an abstract method, endOfMonth, to the Account class. This method will need to be implemented in each subclass. It will adjust balances as required by interest earned or any overdraft charges. You will need to modify the Bank, Branch and Controller classes to allow creation of the different types of account and to perform end of month processing. The Bank class's openAccount method must have, as its first parameter, the type of account to open. You MUST document each subclass but you are NOT required to document changes made to the Bank, Branch and Controller classes.

Total marks -- 50 (10 marks for each subclass that works correctly).

The Address class is also provided for you. All provided classes can be found in the directory $L/lect/accounts.


Computer Science 1620
Department of Mathematics & Computer Science
University of Lethbridge Home Page