Relations
Most of the classes used as examples in the book so far were very simple. To keep things as clear as possible we have removed any unnecessary features (unnecessary from the point of view of the example we were presenting). This included in most cases any relations between classes.
Relations can be looked at from two different points of view. From a practical, hands-on view a relation is a connection between a number of objects or classes. For example a purchase order has items. The word has indicates the relationship between the two entities: the purchase order and the items ordered. Each item in the order refers to a product (that is, what the item is). The refers to is also a relation between the order item class and a product class. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access