2.8. UML Notes

2.8.1. Oneline

../../_images/uml-notes-oneline.png
@startuml

class User
note right: Comment

@enduml

2.8.2. Multiline

../../_images/uml-notes-multiline.png
@startuml

class User
note right
    Comment
    Comment
    Comment
end note

@enduml

2.8.3. Left

../../_images/uml-notes-left.png
@startuml

class User
note left: On last defined class

@enduml

2.8.5. Top

../../_images/uml-notes-top.png
@startuml

class User
note top: On last defined class

@enduml

2.8.6. Bottom

../../_images/uml-notes-bottom.png
@startuml

class User
note bottom: On last defined class

@enduml

2.8.7. Attached to One Object

../../_images/uml-notes-attached-one.png
@startuml

class User

note top of User
  Line 1
  Line 2
  Line 3
end note

@enduml

2.8.8. Attached to Many Objects

../../_images/uml-notes-attached-many.png
@startuml

class User
class Admin

note "Two roles in our system" as Comment

User .. Comment
Admin .. Comment

@enduml

2.8.9. Attribute

../../_images/uml-notes-attribute.png
@startuml

class User {
    username: str
    password: str
}

note right of User::password
    Password will be encrypted
end note

@enduml

2.8.10. Method

../../_images/uml-notes-method.png
@startuml

class User {
    + login()
    + logout()
}

note right of User::login
    Logs user in
end note

note right of User::logout
    Logs user out
end note

@enduml

2.8.11. Relations

../../_images/uml-notes-relations.png
@startuml

class User

User <|-- Admin

note on link: Admin inherits from User

@enduml

2.8.12. Floating

../../_images/uml-notes-floating.png
@startuml

class User
note "This is a floating note" as N1

@enduml

2.8.13. Formatting

../../_images/uml-notes-formatting.png
@startuml

class object

note top of object : "In Python, <b>every</b> class\n<u>inherits</u> from <i>object</i>."

@enduml

2.8.14. Color

../../_images/uml-notes-color.png
@startuml

class User
User <|-- Admin
note on link #red: Admin inherits from User

@enduml