I l @ ve RuBoard |
An aggregation relationship is a specialized form of association in which a whole is related to its part(s). Aggregation is known as a "part-of" or containment relationship. The UML notation for an aggregation relationship is an association with a diamond next to the class denoting the aggregate (whole), as shown in Figure 6-3. Figure 6-3. UML Notation for an Aggregation Relationship
The following tests may be used to determine if an association should be an aggregation:
For example, a Course (Math 101) may be offered at different times during a semester. Each offering is represented as a Course Offering (e.g., Math 101, Section 1, and Math 101, Section 2). The relationship between a Course and a CourseOffering is modeled as an aggregationa Course "has" CourseOfferings. CREATING AN AGGREGATION RELATIONSHIP IN RATIONAL ROSE
An aggregation relationship is shown in Figure 6-4. Figure 6-4. Aggregation Relationship
|
I l @ ve RuBoard |