PracticeDev/study_go/design_pattern/1_simple_factory/README.md

23 lines
463 B
Markdown
Raw Normal View History

2024-09-04 16:21:12 +08:00
# UML
```mermaid
classDiagram
class Product {
<<interface>>
+operation()
}
class ConcreteProductA {
+operation()
}
class ConcreteProductB {
+operation()
}
class SimpleFactory {
+createProduct(string) Product
}
Product <|.. ConcreteProductA
Product <|.. ConcreteProductB
SimpleFactory ..> Product
SimpleFactory ..> ConcreteProductA
SimpleFactory ..> ConcreteProductB
````