Skip to main content

你好世界

1 min 4 words

这是我的第一篇博客

test

Va

聚合模式

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
print("Hello Code")