• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Relationship Pattern

 
Andy Dejung
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Everybody
I'm looking for description of Relationship Pattern. I'm not sure if it's a pattern like those from the GoF.
Here a short description what I mean the pattern is about:
One one side you have partners on the other side there are objects. Now I like to bind partners to the objects with different roles together. The role could be such as owner, buier or renter...
Does anybody know such a pattern and where is it descripte or how is it named???

Thank for help
Andy
 
Rufus BugleWeed
Ranch Hand
Posts: 1551
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mark Grand Patterns in Java Volume I on delegation
However, "is-a-role-played-by" relationships are
awkward to model by inheritance. Instances of a
class can play multiple roles. Let's look at an
example of an airline reservation system. This
airline reservation system includes such roles as
passenger, ticket selling agent, and flight crew.
It's possible to represent this as a class called
Person that has subclasses corresponding to these
roles, as shown in Figure 4.1.
The problem with the diagram depicted in figure
4.1 is that the same person can fill more than
one of these roles. ...
Fowler and Scott in UML Distilled:
Association classes allow you to add attributes,
operations, and other features to associations...
They site some more discussion of historic
patterns in Fowler's 1997 work Analysis
Patterns: Reusable Object Models
.
It's been a while since I reviewed it, but Grady
Booch's OOA & D with Applications might
touch on this pattern too.
HTH
[ November 19, 2002: Message edited by: Rufus BugleWeed ]
 
Andy Dejung
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for you help this had answered my question
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic