posted 11 months ago
Is my understanding and primitive implementations correct? could you also provide few good examples?
Association
- A child can own a parent
- A child doesn't have to be owned by a parent
- A parent doesn't have to own children
Aggregation
- A child can't own a parent
- A child doesn't have to be owned by a parent
- A parent doesn't have to own children
Composition
- A child can't own a parent
- A child must be owned a parent
- A parent must own a child or more
Finally, can type of relation between same classes be different in different systems or it should reflect their real world relation?