- 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ù)中心基礎(chǔ)
- Microsoft SQL Server企業(yè)級(jí)平臺(tái)管理實(shí)踐
- Test-Driven Development with Mockito
- 正則表達(dá)式必知必會(huì)
- Python金融大數(shù)據(jù)分析(第2版)
- Creating Mobile Apps with Sencha Touch 2
- 圖解機(jī)器學(xué)習(xí)算法
- Learning JavaScriptMVC
- 深度剖析Hadoop HDFS
- 數(shù)亦有道:Python數(shù)據(jù)科學(xué)指南
- Apache Kylin權(quán)威指南
- 云數(shù)據(jù)中心網(wǎng)絡(luò)與SDN:技術(shù)架構(gòu)與實(shí)現(xiàn)
- R Machine Learning Essentials
- Scratch 2.0 Game Development HOTSHOT
- NoSQL數(shù)據(jù)庫(kù)原理(第2版·微課版)