Thursday 21 September 2023

How to Define Composition Relationships in Object Diagrams with PlantUML?

Composition relationship is modeled using the symbol *--

 

composition.txt

@startuml

title "Object Composition"

object "My:Brain" as brain

object "My:Frontal" as frontal
object "My:Parietal" as parietal
object "My:Temporal" as temporal
object "My:Occipital" as occipital

brain *-- frontal
brain *-- parietal
brain *-- temporal
brain *-- occipital

@enduml

 

Above snippet generate below diagram.

 


 

Previous                                                    Next                                                    Home

No comments:

Post a Comment