摘要: The Iterator Pattern provides a way to access the elements of an aggregate object sequentially withoutexposing its underlying representation 阅读全文
posted @ 2012-04-27 21:47 qiangzhu 阅读(485) 评论(0) 推荐(0) 编辑
摘要: The Template Method Pattern defines the skeleton of algorithm in a method, define some steps tosubclasses. Template Method lets subclass redefine certain steps of an algorithm without changingthe algorithm's structrue.Class diagram:abstract class AbstractClass{ final void templateMethod(){ primi 阅读全文
posted @ 2012-04-27 21:19 qiangzhu 阅读(474) 评论(0) 推荐(0) 编辑