blob: acc6f3a054ca05724b997350d6a7bc91b31389aa (
plain)
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
37
38
39
40
41
42
43
44
45
46
47
48
|
class
BANK_STORE
inherit
STORABLE
create
make
feature
persons: ARRAYED_SET [PERSON]
accounts: ARRAYED_SET [ACCOUNT]
ranges: TUPLE [
account: attached like account_range;
studentaccount: attached like account_range;
retireeaccount: attached like account_range
]
feature {NONE} -- Implementation
account_range: detachable TUPLE [
creditline: attached like range;
interest_deposit: attached like range;
interest_debit: attached like range
]
range: detachable like {ACCOUNT}.range
feature {NONE} -- Initialization
make(cap: INTEGER)
do
create persons.make(cap)
create accounts.make(cap)
create ranges
ranges.account := new_range
ranges.studentaccount := new_range
ranges.retireeaccount := new_range
end
new_range: attached like account_range
do
create Result
end
end
|