Cs102 Spring 2005 Lab4

Due Date: Monday April 25th by midnight


In this lab you will develop a very simple graphical interface to allow a bank teller access to a customer's bank account. You will work with  inheretance and polymorphism in this lab.



In this lab you will

Your Task

You will create two new classes: checkingAccount and savingsAccount. The classes will extend (inherit from) the existing Account class. You will then have to initialize the two account member variables in the Customer class. You will also have to fill in the body of the methods
The UML for this lab is found below:
Lab4 UML

Beginning your work

Once again you are not starting from scratch. You will start with the files that are set up for you.

copy lab4.zip from my directory as you have copied files for previous labs.

unzip the files in your directory and cd into the lab4 directory that results.

Compile the files that are there using the command

make Lab4

Your executable will also be called Lab4.

I suggest that you begin by stubbing out the SavingsAcct and CheckingAcct classes.  Create the header and cpp files and add the three methods, but don't put any code into the methods yet.

Next you should probably finish implementing the has-a relationship between the Customer class and the two account classes by initializing the two Account pointers with the appropriate objects.

Finally, iteratively finish the lab by working on the implementation of one of the three methods discussed above the UML diagram and working on the associated CheckingAcct and SavingsAcct methods.


When you have finished the lab, remember to include the readme.txt with the usual information
And zip up your lab4 directory and submit it as usual.