CommandPattern_Fan
2018-05-21 15:39:34 2 举报
命令模式-风扇
作者其他创作
大纲/内容
RemoteControl
- command : Command
+ setCommand(Command)+ buttonWasPushed()+ undoButtonWasPushed()
CellingFan
+ HIGH : int = 3+ Medium : int = 2+ LOW : int = 1+ OFF : int = 0- speed : int
+ high()+medium()+low()+off()+getSpeed():int
Command
- cellingFan : CellingFan- speed : int
+ undo()+ excute()
CellingFanHighCommand
+excute()
CellingFanMediumCommand
CellingFanOffCommand
CellingFanLowCommand
RemoteLoader
+main()
NoCommand
0 条评论
下一页