<-- home

# UML cheat sheet

## Relationships

Relationships is one of the easier things to forget about UML.

### Association

Represents the static relationship shared among the objects of two classes.

### Composition

It’s a strong has relationship. The black arrow points to the owning side.

### Aggregation

Is a has relationship. Aggregation uses the diamond on the container with the other side on the contained.

### Realization

A realization relationship is the client implements or executes the behaviour of the supplier.

### Dependency

Is a weak bound, usually when an entity uses other as a function argument or a local variable.

### Generalization

The generalization is an inheritance relationship. The arrow points to the base class.

## Default Values

Default values are expressed in a natural way I bet most of the developers would be intuitive about:

 - foo : int  = 0


## Constants

Constants are expressed through a “convention”, all CAPITAL letters should be used.

 -  MY_CONSTANT : int = 1


# References

• http://pages.cs.wisc.edu/~hasti/cs302/examples/UMLdiagram.html
• https://en.wikipedia.org/wiki/Class_diagram