This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Is-a relationship modelling" Watch "Is-a relationship modelling" New topic
Author

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!

-Danny


SCEA 5/OCMJEA
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: http://aspose.com/file-tools
 
subject: Is-a relationship modelling
 
Similar Threads
JPA: how to model compound key which contains also a foreign key?
Design Approach - All SCEA's plz comment
O-R mapping
Database Inheritance in Hibernate
Mock Exam question