In This Chapter
Modeling the whole and its parts
Differentiating between aggregation and composition
Programming considerations for aggregates
Showing parts within class boxes
When you model associations between classes, you find that UML treats one kind of association with special reverence. This particular association embodies the “whole-or-part-of” relationship that UML modelers call aggregation. Aggregation is just a fancy way of talking about a group of distinct objects (parts) gathered together to form some whole. In this chapter we define aggregation and its stronger form—composition. We demonstrate the UML notation for aggregation and explain why it holds a special place among associations in the world of object-oriented modeling and programming.