发信人: tongcd()
整理人: majorsun(2000-03-09 19:05:22), 站内信件
|
Hi, there, I get confused with the following three kinds class
relationship:
1) Person 2) Person
^ (aggregation)^ ^(composition)^
(Extension) Employer Employee Employer
3) Person
^
Employee
^ (extend)
Employer
Can you guys tell me which and why?
BTW, do you know which UML tool is more suitable for Java ?
Any feed is appreciated.
jim
-- ※ 来源:.月光软件站 http://www.moon-soft.com.[FROM: 216.13.106.120] 发信人: rup (Delta Force), 信区: SystemAnalysis 标 题: Re: Which relationship is appropriate? A real basic question 发信站: 网易虚拟社区 (Tue Dec 21 11:03:58 1999), 站内信件
【 在 tongcd (jim6k4) 的大作中提到: 】
: Hi, there, I get confused with the following three kinds class
: relationship:
:
: 1) Person 2) Person
: .......
It depends on your project.If it is a commercial project,dont't use th e extend
relationship,if the financial relationship is not necessary, use the e xtend.
And the composition relationship means to be totally included,you can decide
it yourself. Extend means:1.optional behavior;2.behavior only run unde r
certain conditions,like a trigger;3.serval different flows which may b e run
based on the some selection.
The tools,I think rational rose is the best. It uses UML to build the model
,and can generate Java source code,C++ ,Ada,VB and etc.
Why not try it?
-- ※ 来源:.月光软件站 http://www.moon-soft.com.[FROM: 202.109.52.252] 发信人: tongcd (jim6k4), 信区: SystemAnalysis 标 题: Re: Which relationship is appropriate? A real basic question 发信站: 网易虚拟社区 (Wed Dec 22 07:18:11 1999), 站内信件
【 在 rup (Delta Force) 的大作中提到: 】
: 【 在 tongcd (jim6k4) 的大作中提到: 】
: : Hi, there, I get confused with the following three kinds class
: : relationship:
: :
: .......
Thanks for your feedback. But sorry, I haven't gotten all.
What do you mean don't use it for commercial project? Why?
I think composition means once you lose the "Person", you will lose "e mployer" and "employee" too. That means
"person" is the a entity which include the other two entities which ar e "emplyer" and "employee". But meanwhile,
"aggregation" show another kind of relationship which also happened be tween the entirety and the individual. So, that's my
question, what's the difference? The last thing, "extend" just describ ed the relationship between base class and
the generated class, right?
Thanks again.
jim
-- ※ 来源:.月光软件站 http://www.moon-soft.com.[FROM: 216.13.111.222]
|
|