Chinaunix首页 | 论坛 | 博客
  • 博客访问: 54845
  • 博文数量: 51
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 410
  • 用 户 组: 普通用户
  • 注册时间: 2018-08-26 01:30
文章分类

全部博文(51)

文章存档

2020年(2)

2018年(49)

我的朋友

发布时间:2018-08-29 05:15:12

大家在学习计算机编程时, 首先, 接触的是结构化编程模式。何谓结构化编程,用简单的比如说就是一块、一块或者一段、一段的程序块。程序块一般称谓函数(使用面向对象语言时称为“方法”)函数一般都有返回值,没有返回值的为void(有些语言也称为“过程”,比如vb, delphi等)使用函数的好处是提高了程序的.........【阅读全文】

阅读(350) | 评论(0) | 转发(0)

发布时间:2018-08-29 05:14:00

大家也许在上学的时候,都会做一道题: 打印一棵树。比如:      *     ***    *****   *******  ********* ************************      *      *&nbs.........【阅读全文】

阅读(278) | 评论(0) | 转发(0)

发布时间:2018-08-29 04:17:48

原文地址:http://www.oodesign.com/template-method-pattern.htmlTemplate MethodMotivationIf we take a look at the dictionary definition of a template we can see that a template is a preset format, used as a starting point for a particular application so that the format does not.........【阅读全文】

阅读(352) | 评论(0) | 转发(0)

发布时间:2018-08-29 04:16:09

原文地址:http://www.oodesign.com/proxy-pattern.htmlProxy PatternMotivationSometimes we need the ability to control the access to an object. For example if we need to use only a few methods of some costly objects we'll initialize those objects when we need them enti.........【阅读全文】

阅读(436) | 评论(0) | 转发(0)

发布时间:2018-08-29 04:15:31

原文地址:http://www.oodesign.com/flyweight-pattern.htmlFlyweight PatternMotivationSome programs require a large number of objects that have some shared state among them. Consider for example a game of war, were there is a large number of soldier objects; a soldier object m.........【阅读全文】

阅读(440) | 评论(0) | 转发(0)
给主人留下些什么吧!~~
留言热议
请登录后留言。

登录 注册