模式模板 - Sample Pattern
用途
Description
classDiagram
classA --|> classB : Inheritance
classC --* classD : Composition
classE --o classF : Aggregation
classG --> classH : Association
classI -- classJ : Link(Solid)
classK ..> classL : Dependency
classM ..|> classN : Realization
classO .. classP : Link(Dashed)
note for ConcreteClass "note here"
IClass <|-- AbstractClass
AbstractClass <|-- ConcreteClass : Inheritance
ConcreteClass <.. Client : Dependency
namespace BaseShapes {
class IClass{
<<Interface>>
+PublicMethod()
}
class AbstractClass{
<<Abstract>>
+AbstractMethod()*
+PublicMethod()
}
class ConcreteClass{
-PrivateMethod()
+PublicMethod()
}
class Client{
+PublicMethod()
}
}
例子
Class(Type)
Class
1
延伸
本文章以 CC BY 4.0 授權