官术网_书友最值得收藏!

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.

主站蜘蛛池模板: 永清县| 县级市| 札达县| 兴仁县| 澳门| 盈江县| 揭东县| 岗巴县| 三门峡市| 巴楚县| 文安县| 南通市| 周口市| 遂溪县| 濮阳县| 常德市| 柘城县| 江华| 寻甸| 筠连县| 大冶市| 富川| 锦屏县| 绍兴市| 五寨县| 民乐县| 九龙县| 龙川县| 上杭县| 基隆市| 宝丰县| 千阳县| 浪卡子县| 尉氏县| 陇南市| 广德县| 瑞昌市| 双柏县| 衢州市| 大冶市| 奉节县|