Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
HandinSWD
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWD_PATT_ 43
HandinSWD
Commits
f442ab4a
Commit
f442ab4a
authored
2 weeks ago
by
Ali Najafi
Browse files
Options
Downloads
Patches
Plain Diff
puml
parent
c8e23610
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cd.puml
+69
-0
69 additions, 0 deletions
cd.puml
with
69 additions
and
0 deletions
cd.puml
0 → 100644
+
69
−
0
View file @
f442ab4a
@startuml
interface SmartHomeMediator {
+notify(SmartDevice sender, string event)
}
class SmartDevice {
SmartHomeMediator mediator
+sendEvent(string event)
}
SmartDevice --> SmartHomeMediator : uses
SmartDevice ..|> SmartHomeMediator
class Light {
+turnOn()
+turnOff()
}
class Thermostat {
+setTemperature(int temp)
}
class SecuritySystem {
+arm()
+disarm()
}
class DoorLock {
+lock()
+unlock()
}
class Camera {
+startRecording()
+stopRecording()
}
class Speaker {
+playMusic()
+stopMusic()
}
class HomeMediator {
- Light light
- Thermostat thermostat
- SecuritySystem security
- DoorLock doorLock
- Camera camera
- Speaker speaker
+notify(SmartDevice sender, string event)
}
SmartHomeMediator <|.. HomeMediator
SmartDevice <|-- Light
SmartDevice <|-- Thermostat
SmartDevice <|-- SecuritySystem
SmartDevice <|-- DoorLock
SmartDevice <|-- Camera
SmartDevice <|-- Speaker
HomeMediator *-- Light : owns
HomeMediator *-- Thermostat : owns
HomeMediator *-- SecuritySystem : owns
HomeMediator *-- DoorLock : owns
HomeMediator *-- Camera : owns
HomeMediator *-- Speaker : owns
@enduml
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment