• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

has a relationship

 
Ranch Hand
Posts: 203
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Bartender
Posts: 3225
34
IntelliJ IDE Oracle Spring Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Saral Saxena
Ranch Hand
Posts: 203
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 3225
34
IntelliJ IDE Oracle Spring Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ravi kapa,
Your post was moved to a new topic.
A new question deserves a new forum topic
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic