Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is-a relationship modelling

 
Dannyf Soon
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers,

I've got a UML modelling question here.

I was given a conceptual model where Object A is Object B, e.g a DIYedPC is a Product for a online PC DIY shop, or a CustomizedSoftwareKit is a Product for a online software customization shop.

So how do you usually model this kind of IS-A relationship? Will you design Class A as a variable member of Class B (i.e. B's instance is holding a reference to A's instance)? Or will you use the 'Item-Descriptor Pattern' / 'The Type Object Pattern' to model the relationship as B describes A?

Looking forward your response!

-Danny
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is a specific symbol in the UML for showing an concrete inheritance relationship. On a Class diagram you would use this symbol to connect the Sub and Super classes. In Java, this is implemented with the "extends" keyword.
 
Dannyf Soon
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your response!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic