diff --git a/Structural/Facade/README.md b/Structural/Facade/README.md index b7e9156..4a9019c 100644 --- a/Structural/Facade/README.md +++ b/Structural/Facade/README.md @@ -15,3 +15,7 @@ That's why a good facade has no `new` in it. If there are multiple creations for The best facade has no `new` and a constructor with interface-type-hinted parameters. If you need creation of new instances, use a Factory as argument. + +## UML Diagram + +![Alt Facade UML Diagram](uml/uml.png) \ No newline at end of file diff --git a/Structural/Facade/uml/uml.png b/Structural/Facade/uml/uml.png new file mode 100644 index 0000000..2e68ca6 Binary files /dev/null and b/Structural/Facade/uml/uml.png differ diff --git a/Structural/Facade/uml/uml.svg b/Structural/Facade/uml/uml.svg new file mode 100644 index 0000000..cf65d10 --- /dev/null +++ b/Structural/Facade/uml/uml.svg @@ -0,0 +1 @@ +BiosInterfaceexecute()waitForKeyPress()launch(OsInterface $os)powerDown()Facade$os : OsInterface$bios : BiosInterface__construct(BiosInterface $bios, OsInterface $os)turnOn()turnOff()OsInterfacehalt() \ No newline at end of file diff --git a/Structural/Facade/uml/uml.txt b/Structural/Facade/uml/uml.txt new file mode 100644 index 0000000..e4b0b94 --- /dev/null +++ b/Structural/Facade/uml/uml.txt @@ -0,0 +1,20 @@ +@startuml +interface BiosInterface { + +execute() + +waitForKeyPress() + +launch(OsInterface $os) + +powerDown() +} + +class Facade { + #$os : OsInterface + #$bios : BiosInterface + +__construct(BiosInterface $bios, OsInterface $os) + +turnOn() + +turnOff() +} + +interface OsInterface { + +halt() +} +@enduml \ No newline at end of file