设计模式—strategy

简单工厂实现方式:

简单工厂对应的client程序:

策略模式:

策略模式对应的client程序:

策略+简单工厂模式对应的client程序:

原文地址:https://www.cnblogs.com/alipayhutu/p/2813907.html