![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
设计模式
modun1986
这个作者很懒,什么都没留下…
展开
-
简单工厂模式
//使用简单计算器实现//运算符基类package Factory;public abstract class Operation { private Double _numberA = new Double(0); private Double _numberB = new Double(0); public abstract Double getRes...2012-05-16 00:13:05 · 69 阅读 · 0 评论 -
策略模式(Strategy)
以商场打折为例package Strategy;public abstract class CashSuper { protected abstract Double acceptCash(Double money);}package Strategy;/** * 正常收费 * @author Modun * */public ...2012-05-23 00:40:12 · 96 阅读 · 0 评论