Aggregation
- If two classes share association relationship, and one class can be said to be part of the other, the relationship is called Aggregation.
- Aggregation expresses a relationship between a ‘whole’ and its ‘part’.
Aggregation example
When the implementation code is written, we have to decide on the actual container class like List, Vector,Array etc.
Aggregation = Association with "whole-part" relationship
Shown by hollow diamond at the "whole" side.
No lifetime control implied.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.