| Author |
has a relationship
|
Saral Saxena
Ranch Hand
Joined: Apr 22, 2011
Posts: 202
|
|
Hi All,
Can anyone please explain the exact difference between IS-A and HAS-A relationship with an example.
what I grasp is that..
the above code shows IS A relationship, this can be implemented as Inheritance. what term stands for it in uml...? like composition we have for has a relationship..?
this shows HAS A relationship.
HAS A also know as composition.
|
 |
Mohamed Sanaulla
Bartender
Joined: Sep 08, 2007
Posts: 2928
|
|
Saral Saxena wrote:
...
what term stands for it in uml...? like composition we have for has a relationship..?
I am not aware of any special term for IS-A, I think its referred to an Inheritance only.
In UML there are 2 types of notation for HAS-A- Aggregation and Composition. In Composition the composed object cannot exist on its own i.e its always part of the composing object. In otherwords composition is stronger form of Aggregation.
|
Mohamed Sanaulla | My Blog
|
 |
Saral Saxena
Ranch Hand
Joined: Apr 22, 2011
Posts: 202
|
|
Mohamed Sanaulla wrote:
Saral Saxena wrote:
...
what term stands for it in uml...? like composition we have for has a relationship..?
I am not aware of any special term for IS-A, I think its referred to an Inheritance only.
In UML there are 2 types of notation for HAS-A- Aggregation and Composition. In Composition the composed object cannot exist on its own i.e its always part of the composing object. In otherwords composition is stronger form of Aggregation.
Hi ,
Yeah you are right ,, IS A stands for inheritance , I am looking for the term that what its represents in UML notation..?? can you please also explain Aggregation , composition with a real life example that will make understandings more clear..!1
|
 |
Mohamed Sanaulla
Bartender
Joined: Sep 08, 2007
Posts: 2928
|
|
Saral Saxena wrote:
Mohamed Sanaulla wrote:
Saral Saxena wrote:
...
what term stands for it in uml...? like composition we have for has a relationship..?
I am not aware of any special term for IS-A, I think its referred to an Inheritance only.
In UML there are 2 types of notation for HAS-A- Aggregation and Composition. In Composition the composed object cannot exist on its own i.e its always part of the composing object. In otherwords composition is stronger form of Aggregation.
Hi ,
Yeah you are right ,, IS A stands for inheritance , I am looking for the term that what its represents in UML notation..?? can you please also explain Aggregation , composition with a real life example that will make understandings more clear..!1
I would suggest to start with searching for information on the web, as UML notations are readily available at lot of places- inheritance uml notation
And for the Aggregation, Composition examples here is one of the many links I found.
The difference in the UML notation for Aggregation and Composition is that for composition the Diamond used at the line is filled. The link given before shows examples for all the notations used in the UML class diagram.
|
 |
Jesper de Jong
Java Cowboy
Bartender
Joined: Aug 16, 2005
Posts: 12929
|
|
Ravi kapa, Your post was moved to a new topic. A new question deserves a new forum topic
|
Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
|
 |
 |
|
|
subject: has a relationship
|
|
|