会员
周边
众包
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
鬼峡
博客园
首页
新随笔
联系
订阅
管理
2015年12月30日
Club之状态模式
摘要: 题目:定义一个俱乐部,它的顾客有三个状态:访客(VistorState), 会员(MemberState),贵宾(VIPState)。每个顾客都有一 个帐户(ClubAccount),帐户上存放顾客的存款,根据存款 的不同数量切换会员的级别,其中0~100 为访客,100~1000 为会员,1000...
阅读全文
posted @ 2015-12-30 13:54 鬼峡
阅读(300)
评论(0)
推荐(0)
2015年12月23日
M_K3之装饰者模式
摘要: 分析:抽象组件——具体组件——抽象装饰类_具体装饰类相关UML图:类总括:相关代码:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tas...
阅读全文
posted @ 2015-12-23 17:38 鬼峡
阅读(152)
评论(0)
推荐(0)
2015年11月28日
M_K2之建造者模式
摘要: Key point: director----builder----concrete builderUML图如下:所需class如下:具体代码如下:using System;using System.Collections.Generic;using System.Linq;using System...
阅读全文
posted @ 2015-11-28 22:06 鬼峡
阅读(205)
评论(0)
推荐(0)
2015年11月7日
M_K抽象工厂模式
摘要: 分析:产品之间存在着共性——需引入接口 ——定义共性——抽象产品类 工厂共同实现的接口——定义共同接口——抽象工厂类相关UML图:类总括:具体代码:using System;using System.Collections.Generic;using System.Lin...
阅读全文
posted @ 2015-11-07 10:17 鬼峡
阅读(210)
评论(1)
推荐(0)
公告