- Hands-On Design Patterns with Java
- Dr. Edward Lavieri
- 110字
- 2021-06-24 14:58:05
Use case
A common use of the command pattern is with user interfaces and related frameworks. This can be extended to both hardware and software interfaces. To demonstrate the command pattern, we will model a hardware control box that contains an on/off toggle, a slider that has a range between 0 and 100, and a digital display for the slider value. Key to our example is that the hardware control box is manufactured without knowing what specifically it will be used for. The following diagram depicts this:

Command design pattern —ControlBox example
In the next section, we will review a UML class diagram associated with our control box example.
推薦閱讀
- 數(shù)據(jù)要素安全流通
- Hands-On Data Structures and Algorithms with Rust
- 云數(shù)據(jù)中心基礎(chǔ)
- 輕松學(xué)大數(shù)據(jù)挖掘:算法、場(chǎng)景與數(shù)據(jù)產(chǎn)品
- Libgdx Cross/platform Game Development Cookbook
- 大話Oracle Grid:云時(shí)代的RAC
- 大數(shù)據(jù)技術(shù)入門(mén)
- MySQL DBA修煉之道
- MySQL數(shù)據(jù)庫(kù)應(yīng)用與管理
- Oracle 內(nèi)核技術(shù)揭密
- 基于數(shù)據(jù)發(fā)布的隱私保護(hù)模型研究
- 一類智能優(yōu)化算法的改進(jìn)及應(yīng)用研究
- Redis 6開(kāi)發(fā)與實(shí)戰(zhàn)
- 數(shù)據(jù)分析師寶典
- 數(shù)據(jù)挖掘:實(shí)用案例分析