Composition and aggregation are widely used in UML analysis and design models to represent part-whole structures. Neither kind of association places any restriction on how the parts may be used from outside the whole object; this can lead to a number of problems if a part object is aliased from outside. conglomeration realises a stronger form of encapsulation than does composition. Parts of conglomerate objects are protected from external access. By imposing instance-level consistency conditions on part-whole relationships, conglomeration can make UML models easier to build, understand, and implement correctly.
展开▼