JWorld@TW the best professional Java site in Taiwan
      註冊 | 登入 | 全文檢索 | 排行榜  

» JWorld@TW » Software Engineering  

按列印兼容模式列印這個話題 列印話題    把這個話題寄給朋友 寄給朋友    訂閱主題
reply to postflat modego to previous topicgo to next topic
本主題所含的標籤
無標籤
作者 Re:小問題請問大家[ aggregation&composition ] [Re:Roberto]
Biologic

生物學下的產物



發文: 524
積分: 4
於 2003-07-15 13:31 user profilesend a private message to usersend email to Biologicreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
Roberto wrote:
hmmm... r u sure about that?
the UML spec says that attribute is semantically equivalent to a association
基本上不知您有否試過 自訂一個 attribute 和拉一條 association 其實是一樣的
差別在於class diagram的可讀性
aggregation(attribute by reference:空心菱形從屬關係謂"生死有命")
composition(attribute by value:實心菱形從屬關係謂"同生共死")

如果是這樣 你應該另外使用 Factory 去 instantiate Class1 and Class2


semantic 指意義上
association 指關聯

你的 Factory Pattern 應該不對:
[Factory] - - -(create)- - -> [<<interface>>Products]


reply to postreply to post
話題樹型展開
人氣 標題 作者 字數 發文時間
11286 [精華] 小問題請問大家[ aggregation&composition ] Biologic 251 2003-07-15 09:40
10340 Re:小問題請問大家[ aggregation&composition ] Roberto 280 2003-07-15 11:31
10336 Re:小問題請問大家[ aggregation&composition ] Biologic 791 2003-07-15 12:31
10218 Re:小問題請問大家[ aggregation&composition ] Roberto 852 2003-07-15 13:12
10182 Re:小問題請問大家[ aggregation&composition ] Biologic 496 2003-07-15 13:31
10227 Re:小問題請問大家[ aggregation&composition ] Roberto 348 2003-07-15 13:45
10151 Re:小問題請問大家[ aggregation&composition ] Biologic 492 2003-07-15 14:12
10217 Re:小問題請問大家[ aggregation&composition ] Roberto 515 2003-07-15 14:27
10225 Re:小問題請問大家[ aggregation&composition ] Biologic 845 2003-07-15 14:58
10148 Re:小問題請問大家[ aggregation&composition ] Roberto 855 2003-07-15 15:39
10158 Re:小問題請問大家[ aggregation&composition ] Biologic 832 2003-07-15 16:09
10178 Re:小問題請問大家[ aggregation&composition ] Roberto 636 2003-07-15 16:24
10290 Re:小問題請問大家[ aggregation&composition ] Biologic 140 2003-07-18 10:57
12576 Re:小問題請問大家[ aggregation&composition ] studman 161 2004-08-06 03:12
» JWorld@TW »  Software Engineering

reply to postflat modego to previous topicgo to next topic
  已讀文章
  新的文章
  被刪除的文章
Jump to the top of page

JWorld@TW 本站商標資訊

Powered by Powerful JuteForum® Version Jute 1.5.8