The main purpose of this example is to show you :
Account Management Example
do with |
Bank |
||||
---|---|---|---|---|---|
open checking account |
12345-67890 |
under the name of |
Bart |
|
Simpson |
check |
that balance of account |
12345-67890 |
is |
$0.00 |
|
deposit |
$100.00 |
in account |
12345-67890 |
||
check |
that balance of account |
12345-67890 |
is |
$100.00 |
|
withdraw |
$50.00 |
from account |
12345-67890 |
||
check |
that balance of account |
12345-67890 |
is |
$50.00 |
|
reject |
withdraw |
$75.00 |
from account |
12345-67890 |
|
check |
that balance of account |
12345-67890 |
is |
$50.00 |
|
accept |
withdraw |
$25.00 |
from account |
12345-67890 |
|
display |
the balance of account |
12345-67890 |
end |
Opening different account type
do with |
Bank |
||||
---|---|---|---|---|---|
open checking account |
12345-67890 |
under the name of |
Bart |
|
Simpson |
open savings account |
54321-09876 |
under the name of |
Lisa |
|
Simpson |
set of |
opened accounts |
|
---|---|---|
number |
type |
owner name |
12345-67890 |
checking |
Bart Simpson |
54321-09876 |
savings |
Lisa Simpson |
end |
Freezing an Account
do with |
Bank |
||||||||
---|---|---|---|---|---|---|---|---|---|
create |
savings |
account |
11111-22222 |
for |
Homer |
|
Simpson |
with balance of |
1546.23 |
accept |
withdraw |
$100.00 |
from account |
11111-22222 |
using |
ATM |
|||
freeze account |
11111-22222 |
||||||||
reject |
withdraw |
$100.25 |
from account |
11111-22222 |
using |
ATM |
|||
accept |
deposit |
$200.00 |
in account |
11111-22222 |
end |
Source Code
AccountType.java
Bank.java
BankAccount.java
BankFixture.java
CheckingAccount.java
Money.java
NoSuchAccountException.java
Owner.java
SavingsAccount.java
WithdrawType.java