Free for PREMIUM members
Go Premium for a chance to win a PS4. Enter to Win
Association classes cannot really exist in Java - you are forced to define all 3 classes and 2 relations with the enrollment type in the middle.
In some senses this is why UML exist
You could model them in-line splitting the relation to instead form 2 relations
relation with meta data is a better description of the logic than 3 classes and 2 relations
You could model them in-line splitting the relation to instead form 2 relations (source > association class and association class to target, in this case student > enrollment and enrollment > course). Typically they exist because the concept of a relation with meta data is a better description of the logic than 3 classes and 2 relations i.e. the student is enrolled in a class and that enrollment occurred at a certain time, rather than students have enrollments, enrollments have classes which is perhaps less obvious.
We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!