UML_类图_带源码_23种设计模式
} Console.Read(); } } // "Component" abstract class Component { protected string name; // Constructor public Component(string name) { this.name = name; } public abstract void Add(Component c); public abstract void Remove(Component c); public abstract void Display(int depth); } // "Composite" class Composite : Component { private ArrayList children = new ArrayList(); // Constructor public Composite(string name) : base(name) { } public override void Add(Component component) { children.Add(component); } public override void Remove(Component component) { children.Remove(component); } public override void Display(int depth) { Console.WriteLine(new String('-', depth) + name); } } // Recursively display child nodes foreach (Component component in children) { component.Display(depth + 2); } // "Leaf" class Leaf : Component { // Constructor public Leaf(string name) : base(name) { } public override void Add(Component c) { Console.WriteLine("Cannot add to a leaf"); } public override void Remove(Component c) { Console.WriteLine("Cannot remove from a leaf"); } public override void Display(int depth) { Console.WriteLine(new String('-', depth) + name); } }
23种设计模式 UML 类图及对... 8页 5财富值 23种设计模式 UML 类图及对... 7页 5财富值 23种设计模式 UML 类图及对... 3页 5财富值 实验一 设计...
(); } } } 23 种设计模式 UML 类图及对应示例代码 (二) 11.DoFactory.GangOfFour.Flyweight.Structural 收藏 Flyweight:运用共享技术有效的支持大量细粒度的...
软件工程的23种设计模式的UML类图_计算机软件及应用_IT/计算机_专业资料。软件工程的23种设计模式的UML类图二 十三种设计模式 0 引言谈到设计模式,绝对应该一起来...
23种设计模式 UML 类图及对应示例代码(二)_IT/计算机_专业资料。23种设计模式 UML 类图及对应示例代码23 种设计模式 UML 类图及对应示例 代码 (二) 二 11....
UML_类图_带源码_23种设计... 70页 1财富值喜欢此文档的还喜欢 深入浅出设计模式(中文版) 93页 1财富值 Java设计模式-图解-附代码 64页 免费 设计模式...
23 种设计模式 UML 类图及对应示例 代码 (三) 三 21.DoFactory.GangOfFour.Strategy.Structural Strategy:定义一系列的算法,把他们封装起来,并可以相互替换,使算法...
23种设计模式 UML 类图及对应示例代码23种设计模式 UML 类图及对应示例代码隐藏>> 23 种设计模式 UML 类图及对应示例 代码 (一) 一 1.DoFactory.GangOfFour....
设计模式(Design Pattern) 张凯 副教授 计算机学院 软件工程系 LOGO 武汉科技大学 www.wust.edu.cn 主要内容 1 2 3 4 UML简介 类图 顺序图 状态图 武汉科技...
系统分析师必会:23种经典设计模式UML类图汇总_计算机软件及应用_IT/计算机_专业资料。系统分析师必会:23种经典设计模式UML类图汇总...
热门文档