ecash.internet
Interface ECashBankListener


public interface ECashBankListener

This interface must be implemented by every class that creates an ECashBank object.

Author:
Michel Deriaz
See Also:
ECashBank

Method Summary
 boolean checkPassword(java.lang.String accountNumber, java.lang.String password)
          Returns true if the password correspond with the account number, false otherwise.
 java.lang.String getAmount(java.lang.String accountNumber)
          Returns the available amount in the specified bank account.
 void report(BuyReport buyReport)
          Called after a client bought some money from his bank account.
 void report(DepositReport depositReport)
          Called after a client deposited some money on his bank account.
 

Method Detail

checkPassword

public boolean checkPassword(java.lang.String accountNumber,
                             java.lang.String password)
Returns true if the password correspond with the account number, false otherwise.

Parameters:
accountNumber - the account number
password - the password
Returns:
a boolean indicating whether the password corresponds to the account number or not

getAmount

public java.lang.String getAmount(java.lang.String accountNumber)
Returns the available amount in the specified bank account.

Parameters:
accountNumber - the account to check
Returns:
the available amount

report

public void report(DepositReport depositReport)
Called after a client deposited some money on his bank account.

Parameters:
depositReport - a report describing the operation
See Also:
DepositReport

report

public void report(BuyReport buyReport)
Called after a client bought some money from his bank account.

Parameters:
buyReport - a report describing the operation
See Also:
BuyReport