Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Association class

 
Raj Waters
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An association class is derived due to many-to-many relationships between two classes.
Is it true?
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No.
 
Raj Waters
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OR rather it is not always true?
 
jim ji
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Association class can be derived from two situations:
first,many to many relations
second,one or more attributes of the class can have multiple values.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An Association Class is used to show properties of an association itself. Of course it can be used on many-to-many relationships, as it can be used on any other.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by happyboy jmw:
Association class can be derived from two situations:
first,many to many relations

Can you please give an example?

second,one or more attributes of the class can have multiple values.

I don't understand this at all...
 
Raj Waters
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by happyboy jmw:
Association class can be derived from two situations: first,many to many relations

Yes can you give some examples.
 
Cuauhtemoc Diaz
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
and the example?
the only thing i can imagine for many to many association is make a structure that takes both classes of the association and savi it into a linked list in the association class
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic