Archive for the ‘UML’ Category
UML Class Relationships
Multiplicities
- any number (0 or more): *
- one or more: 1..*
- zero or one: 0..1
- exactly one: 1
Association(Aggregation, Composition)

Both are ways of designating or grouping items by relationship. In the case of composition, if the links that bind the objects are broken, then all objects are destroyed. In aggregation, it’s a looser grouping, and if the links are broken the original objects still exist.
“Aggregation differs from ordinary composition in that it does not imply ownership. In composition, when the owning object is destroyed, so are the contained objects. In aggregation, this is not necessarily true. For example, a company owns various departments (e.g., sales), and each department has a number of employees. If the university closes, the departments will no longer exist, but the professors in those departments will continue to exist. Therefore, a Company can be seen as a composition of departments, whereas departments have an aggregation of employees. In addition, an Employee could work in more than one department, but a department could not be part of more than one company.”

