摘要:
适配器模式将不改变原有实现的基础上,原来本不兼容的接口转换为兼容的接口: eg.1 arraylistTOother Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1 using System; 2 using System.Collection... 阅读全文
摘要:
用克隆的方法来创建 prototype Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> //游戏魂斗罗,RUN描述主角的敌人 //抽象类 public abstract class NormalActor { // publ... 阅读全文
摘要:
做一个汽车性能试验的项目: 先建立抽象car: Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->abstract class AbstractCar { public abstract void Starup(); public ab... 阅读全文
摘要:
Builder类: builder Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->abstract class House { } public abstract class Builder { public abstract void... 阅读全文
摘要:
eg.AF Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->using System; using System.Collections.Generic; using System.Text; namespace abstractFactory { ... 阅读全文
摘要:
实现singleton基础代码: Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> public class singleton { private static singleton instance; p... 阅读全文