Skip to content

Commit 10df397

Browse files
committed
Improved wording for conclusion
1 parent 5dd6966 commit 10df397

File tree

1 file changed

+2
-3
lines changed
  • Common Design Patterns/Behavioral/Command

1 file changed

+2
-3
lines changed

Common Design Patterns/Behavioral/Command/Command.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,5 @@ As you can see we can easily change the *concrete command type* and change the r
110110

111111
We used *aggregation* as a form of `composition` because doors can outlive the remote control, which means that the remote control doesn't own the door that it is communicating to. This is an important distinction with an another form of `composition` called *association*, however it's not always the case - *aggregation* is just more suitable for this particular example.
112112

113-
## Conclusion
114-
`Command` design pattern is very useful in cases when we need one object to be able to perform various actions without the need to store all the possible actions in a single object. The pattern decomposes the actions into concrete types by using protocol conformance and the *invoker* type that holds a command object to perform concrete actions. Concrete command objects hold actions that can be executed later depending on requirements.
115-
113+
## Conclusion
114+
The `Command` design pattern is highly beneficial when an object is required to perform various actions without storing all possible actions within a single object. This pattern separates actions into concrete types through protocol conformance, utilizing an *invoker* type to hold a command object responsible for executing specific actions. The concrete command objects contain actions that can be executed at a later time based on requirements.

0 commit comments

Comments
 (0)