Introduction
Each time a Borrower checks out a Book from the library,
these objects become associated.
A two-way association is implemented in JADE as follows:
- Each Book has a single reference (called myBorrower) to its Borrower.
- Each Borrower has a collection of references (called myBooks)
to the books he or she has borrowed.
A Collection Class for Books is Needed
The RootSchema contains a class called Collection which,
together with its subclasses, are inherited by the LibrarySchema.
An important use of the collection classes is to implement
one-to-many and many-to-many associations between classes. |