[go: up one dir, main page]

0% found this document useful (0 votes)
7 views15 pages

Association Relationships in UMLsection 02

Association in UML describes the relationships between classes where objects of one class connect to another. Aggregation and composition are two types of association, with aggregation representing a weak relationship and composition indicating a strong relationship. In aggregation, objects can exist independently, while in composition, the existence of parts is dependent on the whole.

Uploaded by

stevenhashiru
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views15 pages

Association Relationships in UMLsection 02

Association in UML describes the relationships between classes where objects of one class connect to another. Aggregation and composition are two types of association, with aggregation representing a weak relationship and composition indicating a strong relationship. In aggregation, objects can exist independently, while in composition, the existence of parts is dependent on the whole.

Uploaded by

stevenhashiru
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Association relationships in

UML
Association
Association
• Association describes the relationship between classes where objects
of one class are connected to objects of another class.
Aggregation and Composition
Aggregation and Composition
• Aggregation and composition are two types of association. Both
aggregation and composition establish a “has-a” relationship
between objects of different classes.
• Aggregation represents a weak relationship where an object can exist
without its parent object.
• Composition indicates a strong relationship where an object cannot
exist without its parent object. It implement a “part-of” relationship
between objects
Composition
Composition
Aggregation

The wheel object can exist without the car object


Aggregation and Composition
Aggregation and Composition
Aggregation and Composition
SUMMARY

• Aggregation and Composition are relationships between two classes.


• An aggregate allows its aggregated objects to be used in other
aggregates. If the aggregate is destroyed, its aggregates can live on in
the system.
• In composition, an object exclusively belongs to the composite object.
When the composite object is destroyed, the parts that belong to it
are destroyed too.
Generalization vs Specialization
Generalization vs Specialization

You might also like