Tools used to create the diagram:
Association
It represents the relationship between two objects, which have their own lifecycle and no owner.
Example
Consider that Student and Teacher have objects. Here multiple students can associate with a single teacher and a single student can associate with multiple teachers. There is no ownership between these two objects.
Copy the below code in http://www.nomnoml.com/
It represents the relationship of objects with their owners, like one object is the whole part or a part of another object
Example
Consider Department and Teacher have objects. Here a teacher belongs to muliple departments or is part of multiple departments. But when we delete, the Department Teacher object will not be destroyed.
Copy the below code in http://www.nomnoml.com/
It represents the relationship of objects with parent/child relationship; i.e., child object is dependent on parent object
Example
A car has exactly one carburetor, and a carburetor is a part of one car. Carburetors cannot exist as separate parts, detached from a specific car.
Copy the below code in http://www.nomnoml.com/
It represents the relationship of objects where one object is dependent on another object.
Example
Client is dependent on server in web applications.
Copy the below code in http://www.nomnoml.com/
Scripts to draw UML in Nomnoml open source tool:
Association types
Connect with me in GitHub:
Conclusion
In this article, we learned about Association, Aggregation, Composition and Dependency relationships with UML diagrams.