mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-09-27 23:09:13 +02:00
Added Composite UML
This commit is contained in:
35
Structural/Bridge/uml/uml.txt
Normal file
35
Structural/Bridge/uml/uml.txt
Normal file
@@ -0,0 +1,35 @@
|
||||
@startuml
|
||||
class Assemble {
|
||||
+work()
|
||||
}
|
||||
|
||||
class Car {
|
||||
+__construct()
|
||||
+manufacture()
|
||||
}
|
||||
|
||||
class Motorcycle {
|
||||
+__construct()
|
||||
+manufacture()
|
||||
}
|
||||
|
||||
class Produce {
|
||||
+work()
|
||||
}
|
||||
|
||||
abstract class Vehicle {
|
||||
protected workShop1
|
||||
protected workShop2
|
||||
+__construct()
|
||||
+manufacture()
|
||||
}
|
||||
|
||||
interface Workshop {
|
||||
+work()
|
||||
}
|
||||
|
||||
Workshop <|.. Assemble
|
||||
Workshop <|.. Produce
|
||||
Vehicle <|.. Motorcycle
|
||||
Vehicle <|.. Car
|
||||
@enduml
|
Reference in New Issue
Block a user