auto commit
This commit is contained in:
@ -11,7 +11,7 @@
|
||||
- Strategy 接口定义了一个算法族,它们都实现了 behavior() 方法。
|
||||
- Context 是使用到该算法族的类,其中的 doSomething() 方法会调用 behavior(),setStrategy(Strategy) 方法可以动态地改变 strategy 对象,也就是说能动态地改变 Context 所使用的算法。
|
||||
|
||||
<div align="center"> <img src="pics/cd1be8c2-755a-4a66-ad92-2e30f8f47922.png"/> </div><br>
|
||||
<div align="center"> <img src="https://cs-notes-1256109796.cos.ap-guangzhou.myqcloud.com/cd1be8c2-755a-4a66-ad92-2e30f8f47922.png"/> </div><br>
|
||||
|
||||
### 与状态模式的比较
|
||||
|
||||
|
Reference in New Issue
Block a user