CoCoME System Tests

org.cocome.tradingsystem.systests.interfaces
Interface IBank


public interface IBank

This is the interface used for a bank. There is exactly one bank in the entire system which is used for all credit card checks. The bank is not checked for events but is just used to manage credit cards (so we know which ones are valid).

Version:
$Rev: 47 $
Author:
Benjamin Hummel, $Author: hummel $

Method Summary
 void createCreditCard(int cardNumber, int pinNumber, int availableMoney)
          Create a new credit card for this bank.
 void deleteCreditCard(int cardNumber)
          Deletes the given credit card.
 int getAvailableMoney(int cardNumber)
          Returns the amount of money (in cents) available for this card.
 

Method Detail

createCreditCard

void createCreditCard(int cardNumber,
                      int pinNumber,
                      int availableMoney)
                      throws java.lang.Exception
Create a new credit card for this bank. If a card of this number already exists, the old card will be replaced.

Parameters:
cardNumber - the number for this card.
pinNumber - the secret pin code for the credit card.
availableMoney - the amount of money in cents associated with this card.
Throws:
java.lang.Exception

getAvailableMoney

int getAvailableMoney(int cardNumber)
                      throws java.lang.Exception
Returns the amount of money (in cents) available for this card.

Parameters:
cardNumber - the number for this card.
Throws:
java.lang.Exception

deleteCreditCard

void deleteCreditCard(int cardNumber)
                      throws java.lang.Exception
Deletes the given credit card. If the card does not exist, nothing happens.

Parameters:
cardNumber - the number of card to be deleted.
Throws:
java.lang.Exception

CoCoME System Tests

CoCoME System Tests - 0.1