Sunday, 24 April 2016

What is Aggregation ?


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’.




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.