-
Notifications
You must be signed in to change notification settings - Fork 39
/
designspecs.txt
36 lines (27 loc) · 937 Bytes
/
designspecs.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
An account has a balance. Customers should be able to deposit money,
withdraw money, and get their balance. Every account has a unique id number.
A bank has many accounts. Each one belongs to a customer who has a
unique id number. Customers also have a first name and a last name.
Each customer may have more than one account.
A checking account can write checks. Each check may be written for no more than the balance. A fee of $1 per check is charged
A savings account credits interest every month. There should be one number containing the current interest rate for the bank
account
id
checkBalance()
bool withdraw( amount )
void deposit( amount )
bank
//someone in the bank must pick a unique id #
newAccount( balance)
closeAccount(id)
customer
id
firstname
lastname
list of accounts
public class Customer {
// private Account mine;
private ArrayList<Account> myAccounts;
}
money
number