你好世界
• 1 min read 1 min • 2 words 2 words
这是我的第2篇博客
聚合模式
classDiagram
class ElectricalDevice {
<<interface>>
+turnOn()
+turnOff()
}
class Light {
+turnOn()
+turnOff()
}
class TV {
+turnOn()
+turnOff()
}
class Fan {
+turnOn()
+turnOff()
}
class SuperSwitch {
-devices: vector< ElectricalDevice>
+addDevice(ElectricalDevice)
+removeDevice(ElectricalDevice)
+turnOn()
+turnOff()
}
ElectricalDevice <|-- Light
ElectricalDevice <|-- TV
ElectricalDevice <|-- Fan
ElectricalDevice <|.. SuperSwitch
...这是我的第一篇博客 [[test]] [[Va]] 聚合模式...
Referenced in this post