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

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.

主站蜘蛛池模板: 林甸县| 深州市| 镇平县| 昭通市| 元阳县| 香格里拉县| 偏关县| 鄯善县| 玛纳斯县| 洛川县| 凯里市| 闵行区| 敦化市| 阿拉善盟| 新闻| 湄潭县| 日照市| 天气| 安塞县| 东乡县| 阜平县| 内江市| 固安县| 磐石市| 靖安县| 什邡市| 沁源县| 长子县| 汉寿县| 西乡县| 玛沁县| 通州区| 平阳县| 茌平县| 巧家县| 房产| 乐都县| 富锦市| 承德市| 荣成市| 沈阳市|