UML Diagram - Quick Revision

Class and Interface Representation -

Class Relationship -

It defines how classes are connected or related to each other.

Association Relationship

It represents relationship b/w two classes where one is related to another in some way. It can be simple connection or have attributes associated with it.

Bidirectional Association Relationship

Both class can call each other

Unidirectional Association Relationship

This association is only in one direction. This means that one class knows about other, but the reverse may not be true.

Note - `Person` can call `Address`, but `Address` cannot call `Person`

Multiplicity Association Relationship

It describes the number of instances of one class associated with a single instance of another class.

Role - It defines the responsibility or purpose of the associated class in the context of relationship.

Aggregation and Composition Relationship

Both comes under has-a relationship
- Aggregation - One class can exist without other class
- Composition - One class cannot exists without other class