- 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.
推薦閱讀
- SQL Server 2008數(shù)據(jù)庫應用技術(第二版)
- Python廣告數(shù)據(jù)挖掘與分析實戰(zhàn)
- 圖解機器學習算法
- Proxmox VE超融合集群實踐真?zhèn)?/a>
- 大數(shù)據(jù)技術入門
- 淘寶、天貓電商數(shù)據(jù)分析與挖掘?qū)崙?zhàn)(第2版)
- IPython Interactive Computing and Visualization Cookbook(Second Edition)
- 從實踐中學習sqlmap數(shù)據(jù)庫注入測試
- 一本書讀懂大數(shù)據(jù)
- 標簽類目體系:面向業(yè)務的數(shù)據(jù)資產(chǎn)設計方法論
- 碼上行動:利用Python與ChatGPT高效搞定Excel數(shù)據(jù)分析
- Machine Learning for Mobile
- Configuration Management with Chef-Solo
- MySQL核心技術手冊
- Oracle數(shù)據(jù)庫性能優(yōu)化的藝術