de.h_da.library.registration.usecase
Interface Registration


public interface Registration

[usecase] This use case comprises all functionality used by library staff to register new customers.


Method Summary
 void modifyRestistration(Customer customer)
          Modifies the data of an already registered customer
 int register(Customer customer)
          [command] Registers a new customer and generates an invoice for the registration fee.
 

Method Detail

modifyRestistration

void modifyRestistration(Customer customer)
Modifies the data of an already registered customer

Parameters:
customer - a volatile Customer object with id
        [pre exists Customer c: c.id == customer.id
         post c.name.equals(customer.name)
         analogous for all other attributes of entity Customer
        ]
 

register

int register(Customer customer)
[command] Registers a new customer and generates an invoice for the registration fee.

Parameters:
customer - [inout] a volatile Customer object
Returns:
[out] the id of the persistent Customer object
        [pre not exists Customer c: c.id == result
         post exists Customer c: c.id == result
         post c.name.equals(customer.name)
         analogous for all other attributes of entity Customer
         post exists Invoice i: 
              i.date is current date 
              && i.subject.equals("Registration fee") 
              && i.name.equals(customer.name) 
              && i.address.equals(customer.address)
              && i.amount = 500 && // EUR 5.00 registration fee
        ]