BankAndCustomer
Loading...
Searching...
No Matches
BankAndCustomer

Association class example

An association class is part of an association relationship between two other classes. An association class can be assigned to an association relationship to specify additional information that only concerns this relationship. An association class is a normal class and can contain attributes and operations.

For example, a "bank" has an association with "bank customers". The "bank customer" is represented by the class [Person] and is a superclass of, for example, natural persons [NaturalPerson] and [LegalEntity] from which the class [Bank] is derived.

An association class with the name [BankAccount] defines the relationship between the classes [Bank] and [Person] in more detail by specifying the IBAN for the association relationship.

Since a bank has to manage a very large number of bank customers and their accounts, the bank accounts cannot be accessed from the bank via a list, but rather the accounts are managed via an indexed glo::TAllSet < BankAccount > with the corresponding index filter. The bank accounts can also be accessed by the bank customer (objects of the class [Person] or its subclasses) using the same pattern.

The association class [BankAccount] has, in addition to the unique IBAN, an object ID reference to the bank and the bank customer.