posted 23 years ago
Aggregation is an object oriented concept that means "an object can contain other objects." For example, a room can be an aggregate of a floor, four walls and a ceiling. So we have four classes here: room, floor, wall, ceiling.
Aggregation is somewhat different from composition. In composition, we again have the "whole-part" concept, but the "part" object is assumed to "live" and "die" within the whole. It doesn't have any value of its own. For example, our teeth may be part of our body, but according to our design, they may not have any significance of their own.
Muhammad Ali Shah
Karachi, Pakistan.