23种设计模式 UML 类图及对应示例代码 (二)

11.DoFactory.GangOfFour.Flyweight.Structural

 



Code

 

12.DoFactory.GangOfFour.Interpreter.Structural

 



Code

 

13.DoFactory.GangOfFour.Iterator.Structural

 



Code

 

14.DoFactory.GangOfFour.Mediator.Structural

 



Code

 

15.DoFactory.GangOfFour.Memento.Structural

 



Code

 

16.DoFactory.GangOfFour.Observer.Structural

 



Code

17.DoFactory.GangOfFour.Prototype.Structural

 



Code

18.DoFactory.GangOfFour.Proxy.Structural

 



Code

 

19.DoFactory.GangOfFour.Singleton.Structural



Code

 

20.DoFactory.GangOfFour.State.Structural

 



Code