Aggregation
Aggregation is a special type of association that describes the "overall to local" relationship. Aggregation is divided into:
Basic AggregationAnd
Synthetic Aggregation
Basic Aggregation:
Basic aggregation is generally also known as
Aggregation (Aggregation). In a basic aggregation relationship,
partial Class (B)'s life cycle is independent of
Overall Class (A)'s life cycle. This is a general-purpose aggregation relationship, and is a
weak to haveRelationship, a pair of images can contain one or more b pairs of images, but the B pair is not part of a pair image. Like what:
car (A)is a whole entity, and
Wheel (B)Tires are part of the whole car. Tyres can be manufactured in the first few weeks of placement in the car and placed in warehouses. In this example, the wheel class instance clearly exists independently of the car class instance. UML is represented as follows: (Draw a solid line from a parent class to a partial class, and draw an unfilled prism at the end of the parent class's association)
Synthetic Aggregation:Synthetic polymerization is generally also known as
synthesis (composition). In the synthetic aggregation relationship,
partial Class (B)Life cycle is not independent of
Overall
Class (A)Week of life. This is a hardening of the aggregation relationship, is a
Strong PossessionRelationship, a pair of like must have one or more B pairs like, b pair like a pair like part. For example: The relationship between the company and the department.
Company (A) and Department (B)Are modeled as classes that cannot exist until the company exists. Here the instance of the Department class is dependent on the instance of the company class and exists: The life cycle of the department relies on the company's life cycle. UML is represented as follows: (note that a composite relationship is drawn like an aggregation relationship, but this time the diamond is filled) reference: http://www.ibm.com/developerworks/cn/rational/rationaledge/content/feb05/bell/
Aggregation and UML representations