2.8. UML Notes
2.8.1. Oneline

@startuml
class User
note right: Comment
@enduml
2.8.2. Multiline

@startuml
class User
note right
Comment
Comment
Comment
end note
@enduml
2.8.3. Left

@startuml
class User
note left: On last defined class
@enduml
2.8.4. Right

@startuml
class User
note right: On last defined class
@enduml
2.8.5. Top

@startuml
class User
note top: On last defined class
@enduml
2.8.6. Bottom

@startuml
class User
note bottom: On last defined class
@enduml
2.8.7. Attached to One Object

@startuml
class User
note top of User
Line 1
Line 2
Line 3
end note
@enduml
2.8.8. Attached to Many Objects

@startuml
class User
class Admin
note "Two roles in our system" as Comment
User .. Comment
Admin .. Comment
@enduml
2.8.9. Attribute

@startuml
class User {
username: str
password: str
}
note right of User::password
Password will be encrypted
end note
@enduml
2.8.10. Method

@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

@startuml
class User
User <|-- Admin
note on link: Admin inherits from User
@enduml
2.8.12. Floating

@startuml
class User
note "This is a floating note" as N1
@enduml
2.8.13. Formatting

@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

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