diff options
Diffstat (limited to 'bank-eiffel/person.e')
| -rw-r--r-- | bank-eiffel/person.e | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/bank-eiffel/person.e b/bank-eiffel/person.e index 54e1a45..9a2b281 100644 --- a/bank-eiffel/person.e +++ b/bank-eiffel/person.e | |||
| @@ -14,11 +14,9 @@ feature -- Access | |||
| 14 | 14 | ||
| 15 | surname: STRING_8 assign set_surname | 15 | surname: STRING_8 assign set_surname |
| 16 | -- Nachname | 16 | -- Nachname |
| 17 | attribute Result := ({like surname}).default end --| Remove line when Void Safety is properly set | ||
| 18 | 17 | ||
| 19 | firstname: STRING_8 assign set_firstname | 18 | firstname: STRING_8 assign set_firstname |
| 20 | -- Vorname | 19 | -- Vorname |
| 21 | attribute Result := ({like firstname}).default end --| Remove line when Void Safety is properly set | ||
| 22 | 20 | ||
| 23 | feature {NONE} -- Initialization | 21 | feature {NONE} -- Initialization |
| 24 | 22 | ||
| @@ -33,7 +31,7 @@ feature {NONE} -- Implementation | |||
| 33 | set_surname (a_surname: like surname) | 31 | set_surname (a_surname: like surname) |
| 34 | -- Assign `surname' with `a_surname'. | 32 | -- Assign `surname' with `a_surname'. |
| 35 | require | 33 | require |
| 36 | a_surname_not_empty: a_surname /= Void and then not a_surname.is_empty | 34 | a_surname_not_empty: not a_surname.is_empty |
| 37 | do | 35 | do |
| 38 | surname := a_surname | 36 | surname := a_surname |
| 39 | ensure | 37 | ensure |
| @@ -43,7 +41,7 @@ feature {NONE} -- Implementation | |||
| 43 | set_firstname (a_firstname: like firstname) | 41 | set_firstname (a_firstname: like firstname) |
| 44 | -- Assign `firstname' with `a_firstname'. | 42 | -- Assign `firstname' with `a_firstname'. |
| 45 | require | 43 | require |
| 46 | a_firstname_not_empty: a_firstname /= Void and then not a_firstname.is_empty | 44 | a_firstname_not_empty: not a_firstname.is_empty |
| 47 | do | 45 | do |
| 48 | firstname := a_firstname | 46 | firstname := a_firstname |
| 49 | ensure | 47 | ensure |
| @@ -51,6 +49,6 @@ feature {NONE} -- Implementation | |||
| 51 | end | 49 | end |
| 52 | 50 | ||
| 53 | invariant | 51 | invariant |
| 54 | firstname_not_empty: firstname /= Void and then not firstname.is_empty | 52 | firstname_not_empty: not firstname.is_empty |
| 55 | surname_not_empty: surname /= Void and then not surname.is_empty | 53 | surname_not_empty: not surname.is_empty |
| 56 | end | 54 | end |
