|
Heart-Brain relationship in UML 2 Years, 9 Months ago
|
Karma: 3
|
|
Hi
The heart dies when the brain dies and vice-versa.
So, I was wondering if we represent such a mutually composite relationship by 2 filled diamond arrows at both ends in the class boxes ? .
regards
Shashank
|
|
|
|
Last Edit: 2009/05/04 06:29 By Dixit.
I dont want to be right. I just want to know whether I am right
Albert Einstein
|
|
|
Re:Heart-Brain relationship in UML 2 Years, 9 Months ago
|
Karma: 1
|
|
I think the direction wont be necessary as both are in need of each other. Only the filled diamonds(composite aggregation) will be required i guess!!!!!
|
|
|
|
|
|
|
Re:Heart-Brain relationship in UML 2 Years, 9 Months ago
|
Karma: 5
|
|
The Heart does not contain the brain and visa versa so the relationship between them is not composite aggregation.
The body contains both the heart and the mind. Sometimes in programming we have to over-simplify reality. When faced with such a scenario, we need to introduce another object, global to both. Or, some kind of messaging system, which would make them dependent(see below).
They have a dependency on one another though.
So a dotted line between them would suffice.
|
|
|
|
"There is a principle which is a bar against all information, which is a proof against all argument, and which cannot fail to keep a man in everlasting ignorance - that principle is condemnation before investigation." - Herbert Spencer
|
|
|
Re:Heart-Brain relationship in UML 2 Years, 9 Months ago
|
Karma: 3
|
|
Thank you sir..that clears it up nicely !
|
|
|
|
I dont want to be right. I just want to know whether I am right
Albert Einstein
|
|
|