Aller au contenu

Classe Singleton

3 classes avec dependency, association

classDiagram
    class Printer {
        +String model
        +print(String str)
    }
    class Repartitor {
        -String instance
        +int currentPrinter
        -Repartitor()
        +getInstance()
        +print(String str)
    }
    class Computer {
        +String name
        +print(String str)
    }
    Repartitor --> Printer
    Computer ..> Repartitor