diff options
Diffstat (limited to 'bank-eiffel/studentaccount.e')
| -rw-r--r-- | bank-eiffel/studentaccount.e | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/bank-eiffel/studentaccount.e b/bank-eiffel/studentaccount.e index a80d4bb..d1ccaef 100644 --- a/bank-eiffel/studentaccount.e +++ b/bank-eiffel/studentaccount.e | |||
| @@ -10,6 +10,16 @@ class | |||
| 10 | inherit | 10 | inherit |
| 11 | ACCOUNT | 11 | ACCOUNT |
| 12 | 12 | ||
| 13 | create | ||
| 14 | make | ||
| 15 | |||
| 13 | invariant | 16 | invariant |
| 14 | authorized_signers_only_one: authorized_signers.count = 1 | 17 | authorized_signers_only_one: authorized_signers.count = 1 |
| 18 | authorized_signers_attached: authorized_signers.linear_representation /= Void | ||
| 19 | authorized_signers_only_students: | ||
| 20 | (attached authorized_signers.linear_representation as signers) implies signers.for_all( | ||
| 21 | agent (person: PERSON): BOOLEAN | ||
| 22 | do | ||
| 23 | Result := attached {STUDENT} person | ||
| 24 | end) | ||
| 15 | end | 25 | end |
