File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes OO, Patterns, UML and Refactoring and the fly likes Is-a relationship modelling Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Is-a relationship modelling" Watch "Is-a relationship modelling" New topic

Is-a relationship modelling

Dannyf Soon
Ranch Hand

Joined: Oct 07, 2008
Posts: 37
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!


Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
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

Joined: Oct 07, 2008
Posts: 37
Thanks for your response!
I agree. Here's the link:
subject: Is-a relationship modelling
It's not a secret anymore!