summaryrefslogtreecommitdiffstats
path: root/bank-eiffel/retireeaccount.e
diff options
context:
space:
mode:
Diffstat (limited to 'bank-eiffel/retireeaccount.e')
-rw-r--r--bank-eiffel/retireeaccount.e37
1 files changed, 31 insertions, 6 deletions
diff --git a/bank-eiffel/retireeaccount.e b/bank-eiffel/retireeaccount.e
index 3f56fd4..24ae004 100644
--- a/bank-eiffel/retireeaccount.e
+++ b/bank-eiffel/retireeaccount.e
@@ -1,15 +1,40 @@
1note
2 description: "Summary description for {RETIREEACCOUNT}."
3 author: ""
4 date: "$Date$"
5 revision: "$Revision$"
6
7class 1class
8 RETIREEACCOUNT 2 RETIREEACCOUNT
9 3
10inherit 4inherit
11 ACCOUNT 5 ACCOUNT
6 redefine
7 add_authorized_signer,
8 set_default_transfer_minamount
9 end
10
11create
12 make
13
14feature -- Basic operations
15
16 add_authorized_signer (an_authorized_signer: PERSON)
17 do
18 check
19 authorized_signers_only_one: get_authorized_signers.count = 0
20 end
21 Precursor (an_authorized_signer)
22 end
23
24feature {NONE} -- Implementation
25
26 set_default_transfer_minamount
27 do
28 set_transfer_minamount (1.0)
29 end
12 30
13invariant 31invariant
14 authorized_signers_only_one: authorized_signers.count = 1 32 authorized_signers_only_one: authorized_signers.count = 1
33 authorized_signers_attached: authorized_signers.linear_representation /= Void
34 authorized_signers_only_retirees:
35 (attached authorized_signers.linear_representation as signers) implies signers.for_all(
36 agent (person: PERSON): BOOLEAN
37 do
38 Result := attached {RETIREE} person
39 end)
15end 40end