From 4453374f4e9ae51ea4d9dec4c4407e420e61b72f Mon Sep 17 00:00:00 2001 From: manuel Date: Sun, 22 May 2011 17:29:58 +0200 Subject: some stuff.. --- bank-eiffel/account.e | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'bank-eiffel/account.e') diff --git a/bank-eiffel/account.e b/bank-eiffel/account.e index 154a1fa..3ef7a8b 100644 --- a/bank-eiffel/account.e +++ b/bank-eiffel/account.e @@ -51,8 +51,9 @@ feature {NONE} -- Initialization feature -- Basic operations - deposit (an_amount: like transfer_minamount) + deposit (an_amount: like transfer_minamount; an_authorized_signer: PERSON) require + an_authorized_signer_authorized: authorized_signers.has (an_authorized_signer) an_amount_positive: an_amount > 0.0 transfer_minamount_ok: an_amount >= transfer_minamount do @@ -62,8 +63,9 @@ feature -- Basic operations deposited: balance = old balance + an_amount end - withdraw (an_amount: like transfer_minamount) + withdraw (an_amount: like transfer_minamount; an_authorized_signer: PERSON) require + an_authorized_signer_authorized: authorized_signers.has (an_authorized_signer) an_amount_positive: an_amount > 0.0 transfer_minamount_ok: an_amount >= transfer_minamount do @@ -74,14 +76,12 @@ feature -- Basic operations creditline_ok: balance >= creditline end - transfer(an_amount: like transfer_minamount; an_account: like Current) + transfer(an_amount: like transfer_minamount; an_authorized_signer: PERSON; an_account: like Current; another_authorized_signer: PERSON;) require - an_amount_positive: an_amount > 0.0 - transfer_minamount_ok: an_amount >= transfer_minamount an_account_attached: an_account /= Void do - withdraw (an_amount) - an_account.deposit (an_amount) + withdraw (an_amount, an_authorized_signer) + an_account.deposit (an_amount, another_authorized_signer) end add_authorized_signer (an_authorized_signer: PERSON) -- cgit v1.2.3