Advanced Programming - CS239

 

Department of Computer Science

 

 

           

Software Requirements Specification: Programming Assignment 3

Due Tuesday, March 22, 10:00pm

Introduction

Purpose: A "banking" application called JMUsury.

Background

General Information: JMU is about to introduce a new service called JMUsury. This service will allow students to save money for graduation.

The service will offer three different kinds of accounts (none of which earn any interest):

Fixed Term Savings Account: An account that allows deposits at any time but withdrawals only upon graduation.

Savings Account: An account that allows deposits and withdrawals at any time.

Mixed Savings Account: An account that allows deposits at any time and withdrawals of only a portion of the balance. Specifically, whenever the balance gets above a predetermined limit, the "overage" is moved into an "unavailable balance" that can't be withdrawn from.

Existing Components: The FixedTermSavings.java account class has already been implemented. The source code is available and must not be modified.

FixedTermSavingsAccount.java

New Components: You must develop the following classes:

SavingsAccount
MixedSavingsAccount
Driver

These classes must not be in a package.  You will need to submit all 4 classes (include the FixedTermSavingsAccount.java).

Detailed requirements for each of these classes are given below.

Details

Account Numbers:

Account numbers must be unique and must be sequential. The first account number that is created must be 1 (regardless of the type of account), the second must be 2 (again, regardless of the type of account), etc...

The SavingsAccount Class:

This class must extend the FixedTermSavingsAccount class and must:

This class may contain other methods and attributes as well.

The MixedSavingsAccount Class:

This class must extend the SavingsAccount class and must:

If the deposit increases the balance over the limit on available funds then the difference is moved into the "unavailable balance". For example, suppose the old balance is $500 and the limit is $700. A deposit of $300 will result in balance of $800, $100 of which will be unavailable for withdrawal.

This class may contain other methods and attributes as well.

The Driver Class:

You must write a driver that tests all aspects of the classes above.

Evaluation:

Your program will be evaluated using a standard instructor driver.  If you change your methods in any way from the listed method specifications your program may fail the driver test.

You will also be evaluated on the completeness of your own tests.  Your tests in Driver.java should fully test each kind of account and the methods that may be called within each.

As usual, you will also be evaluated based on the conformance of your program to the course style guides. 

Hints:

Even though this application is not very large, it will be easier to complete if you do divide it into pieces. You should:

Questions to Think About:

How could these classes be improved by changing the accessibility of some attributes or methods to protected?

Copyright ©2005