Meaningless Drivel is fun!*
The moose likes OO, Patterns, UML and Refactoring and the fly likes Association class 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 "Association class" Watch "Association class" New topic
Author

Association class

Raj Waters
Ranch Hand

Joined: Apr 21, 2002
Posts: 37
An association class is derived due to many-to-many relationships between two classes.
Is it true?


- Raj<br />[MCSE, SCJP, SCWCD]
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
No.


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Raj Waters
Ranch Hand

Joined: Apr 21, 2002
Posts: 37
OR rather it is not always true?
jim ji
Greenhorn

Joined: May 12, 2003
Posts: 22
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.


IBM Object-Oriented Analysis and Design with UML<br />Sun Certified Programmer for Java 2 Platform<br />Sun Certified Web Component Developer for J2EE Platform<br />Sun Certified Developer for Java Web Services<br />Sun Certified Enterprise Architect for J2EE Platform - Part I<br /> <br />I am from China.
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
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

Joined: Jul 11, 2001
Posts: 14112
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

Joined: Apr 21, 2002
Posts: 37
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

Joined: Mar 04, 2011
Posts: 1
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
 
jQuery in Action, 2nd edition
 
subject: Association class
 
Similar Threads
Unidirection Association
Hibernate POJOs -- association or no-association ?
Association mapping
Ternary Association
Association class