- 3
- 0
- 约1.33万字
- 约 43页
- 2020-11-10 发布于四川
- 举报
State transaction diagram NoTransactionFeeState TransactionFeeState OverDrawnState balance = 2000 -1000 balance 0 transaction fee ($5) 0 balance 2000 transaction fee ($2) withdraw withdraw deposit deposit deposit withdraw Design Example Using the State Pattern 限制:在以上任何状态下,都不允许超过透支上限(-1000)的交易发生。 The banking system is designed as below See next page Design Example Using the State Pattern 保持BankContext类 的引用. 该对象由setContext方法传入 保持一个State类的一个引用objState,维护banlance与state State #context: BankContext #changeState():void +passStateObjToContext():void +getAcctNum():String +getState():String +setCo
您可能关注的文档
- 摄影测量学课件 3.6.3像点位移与方向偏差 - 像点位移与方向偏差.ppt
- 摄影测量学课件 3.5.5单片空间后方交会 - 单片空间后方交会.ppt
- 摄影测量学课件 3.4.3共线条件方程 - 共线条件方程.ppt
- 摄影测量学课件 3.3.3像空间直角坐标变换 - 像空间直角坐标变换.ppt
- 摄影测量学课件 3.2.1航摄影像的方位元素 - 航摄影像的方位元素.ppt
- 摄影测量学课件 3.1.1摄影测量常用坐标系 - 摄影测量常用坐标系.ppt
- 摄影测量学课件 2.3.1透视变换成像原理 - 透视变换成像原理.ppt
- 摄影测量学课件 2.2.1航摄像片的重要点线面 - 航摄像片的重要点线面.ppt
- 摄影测量学课件 2.1.2航空摄影的基本要求 - 航空摄影的基本要求.ppt
- 摄影测量学课件 1.2.3摄影测量学的发展历程 - 摄影测量学的发展历程.ppt
原创力文档

文档评论(0)