Quantcast
Channel: Java mon amour
Viewing all articles
Browse latest Browse all 1121

More on UML Modelling with PlantUML

$
0
0
Here an excellent explanation of the different types of dependencies amongst classes.

Here are all the sort of relationships you can draw.
As a simple reminder, Composition, Aggregation, Dependency, Association are in decreasing order of "tight coupling" between 2 classes.

  • Composition = B cannot exist without A
  • Aggregation = B is a part of A
  • Dependency = change in B affects A
  • Association = very loose relationship

@startuml
left to right direction
Class01 <|-- Class02 : Extension
Class001 "1" *-- "many" Class002 : contains (one to many)
Class03 *-- Class04 : Composition
Class05 o-- Class06 : Aggregation
Class07 .. Class08 : Dependency
Class09 -- Class10 : Association
Class11 <|.. Class12 : Implements
Class13 --> Class14: Unidirectional Association
Class15 ..> Class16: Unidirectional Dependency
Class19 *--> Class20: Unidirectional Composition
Class21 -- Class21: Reflexive Association
@enduml





Viewing all articles
Browse latest Browse all 1121

Trending Articles