Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Design Pattern & UML  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 Re:Aggregation 与 Composition 的区别? [Re:jameszhang]
floater

Java Jedi

总版主


发贴: 3233
积分: 421
于 2004-11-04 11:10 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
normally, there should not have any getter/setter for the composition, so the member will have the same lifetime as the object containing it. Otherwise, if other objects hold the reference of the member, then the member just can't have the same lifetime as the object.

This is where we are talking about objects, not just classes.



"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
- Martin Fowler, Refactoring - Improving the Design of Existing Code

话题树型展开
人气 标题 作者 字数 发贴时间
24221 Aggregation 与 Composition 的区别? jameszhang 7 2004-11-03 10:08
22442 Re:Aggregation 与 Composition 的区别? jameszhang 368 2004-11-03 11:22
23968 Re:Aggregation 与 Composition 的区别? mluo 500 2004-11-30 04:10
22178 Re:Aggregation 与 Composition 的区别? floater 693 2004-11-03 12:48
22079 Re:Aggregation 与 Composition 的区别? jameszhang 46 2004-11-03 13:31
22236 Re:Aggregation 与 Composition 的区别? wes109 336 2004-11-03 15:21
22117 Re:Aggregation 与 Composition 的区别? jameszhang 415 2004-11-03 16:09
22054 Re:Aggregation 与 Composition 的区别? wes109 24 2004-11-03 16:24
22021 Re:Aggregation 与 Composition 的区别? jameszhang 110 2004-11-04 08:08
22160 Re:Aggregation 与 Composition 的区别? floater 333 2004-11-04 11:10
22039 Re:Aggregation 与 Composition 的区别? jameszhang 409 2004-11-04 11:32
22036 Re:Aggregation 与 Composition 的区别? floater 4 2004-11-04 11:56
22107 Re:Aggregation 与 Composition 的区别? supertom 0 2004-11-18 09:18
22365 Re:Aggregation 与 Composition 的区别? WeiterWay 183 2004-11-24 10:42

flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923