Perhaps also try introducing another type of bank account. The
bank programs given all store bank accounts of only two types:
AccountB
and DepositAccountB
which is
a subtype of AccountB
. Try introducing another type
of bank account which will have to be another subtype of
AccountB
, for example a type OverdraftAccount
,
a sort of account which is allowed to go overdrawn to a particular
limit. The front-end program (UseBank1.java
and so on)
will need modifying so there is an additional command which can be
used to change an OverdraftAccount
's overdraft limit.
You might also want to arrange for interest to be taken from overdrawn
accounts when the update command is called.
In the lecture where we went over the previous test, we covered in
particular issues involving the type String
and
related types, which a lot of people had problems with in the test.
Here are some notes from the web on strings and characters:
Matthew Huntbach 28th Febuary 2001