中等MiddleState
+ MiddleState(AbstractState state)+ checkState():void
抽象类模式AbstractState
# hj:ScoreContext# stateName:String# score:int
+ checkState():void+ addScore(int x):void
环境类ScoreContext
- state:AbstractState
+ ScoreContext()+ setState(AbstractState state):void+ getState():AbstractState+ add(int score):void
优秀HighState
+ HighState(AbstractState state)+ checkState():void
不及格LowState
+ LowState(ScoreContext h) + LowState(AbstractState state)+ checkState():void