This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Java in General and the fly likes relationship b/n classes and instances Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "relationship b/n classes and instances" Watch "relationship b/n classes and instances" New topic
Author

relationship b/n classes and instances

william kane
Ranch Hand

Joined: Nov 21, 2000
Posts: 260
Is there a difference b/n the relationship b/n classes and the relationship b/n objects that are instances of those classes
Are there any resources where is i can more info on the same?


Help me!Help you!!!
Rahul Mahindrakar
Ranch Hand

Joined: Jul 28, 2000
Posts: 1850
Classes basically share a structural relationship which can be created using class diagrams. This is clearly specifed at compile time itself.
However Objects mostly share a behavioural relationship. This can be shown using the Object diagrams. Thus i can have two Objects who do not know each other at the compile time reference each other at runtime.

------------------
Regds.
Mahindrakar
william kane
Ranch Hand

Joined: Nov 21, 2000
Posts: 260
thanks for that reply .What i wanna know how will this relationship difference have a say at the time of design does this aspect need a consideration at all or not?
Sean MacLean
author
Ranch Hand

Joined: Nov 07, 2000
Posts: 621
There are certainly design pattern issues, but I think you can boil it down to uninstantiated classes that offer static (i.e. utility functionality) methods or 'client' specific instances that contain unique data in every instance. In the design phase you won't have to specify how the class is used (really) except for qualifying the methods with static or not. I know this isn't much to go on but perhaps it will seed further discussion.
Sean
 
 
subject: relationship b/n classes and instances