@startuml
title Hello Title
scale 1
enum HelloWorld {
ONE
TWO
THREE
}
class Hello {
- privateField: int
# protectedField: int
~ packagePrivateField: int
+ publicField: int
- privateMethod(): void
# protectedMethod(): void
~ packagePrivateMethod(): void
+ publicMethod(): void
}
abstract class Hello1
’ 这是继承—泛化
Hello1 <|-- World1
interface Hello2
’ 这是继承—实现
Hello2 <|… World2
’ 这是依赖
Book…>Library
’ 这是关联
Address <-- Husband
Husband <–> Wife
Husband2 – Wife2
’ 这是聚合
Department o-- Employee
’ 这是组合
Body “1” *-- “2” Arm
Body “1” *-- “2” Leg
@enduml