UML Relationship (Unified Modeling Language)

Relationships in UML

Dependency is the relationship between two things in which a change in one thing may affect the other thing, but not necessarily the reverse. Graphically, it can be represented as a dashed directed line, directed to the thing being depended on.

An association is a relationship that connects classes. Example of association is relationship between person and company. An association is rendered as solid line.

Adornments of association

Name: You can use Name to specify the nature of association
Role: Each class has specific role that participates in the relationship. We can specify role to the classes involve in the relationship.
Multiplicity: It represents how many objects may be connected across an instance of an association.
Aggregation: It implies whole/part relationship where one class represents larger thing which consists of smaller things.

In this type of relationship, the child shares the structure and behavior of the parent. It is represented as a solid line with a hollow arrowhead pointing to the parent.

A realization is a relationship where one class specifies a contract which another class carries out. This kind of interface can be found out between the interface and the class.

QUESTION - What are Relationships in UML?

- Dependencies, Generalization, and Association.
- Dependencies -a change in specification of one thing may affect another thing.
- Generalization-class subclass scenario, one entity inherits from other.
- Associations-a room has walls, person works for a company.
UML Diagram (Unified Modeling Language)
Diagram in UML-Object Diagram, Use case Diagram, Sequence Diagram........
UML Class Diagram (Unified Modeling Language)
Class diagram in UML-Class diagram represents a set of classes, interfaces and collaborations............
UML Object Diagram (Unified Modeling Language)
Object diagram in UML-Object diagram represents a set of objects and their relationships.......
Post your comment