my dog learned polymorphism*
The moose likes Associate Certification (SCJA,OCAJ 5/6) and the fly likes urgent query on scja uml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Associate Certification (SCJA,OCAJ 5/6)
Bookmark "urgent query on scja uml" Watch "urgent query on scja uml" New topic
Author

urgent query on scja uml

paarul saxena
Greenhorn

Joined: Jun 18, 2008
Posts: 10
the answer to this question varies in mocks...
when class p is associate to class q with the multiplicity defined as *(many) on p side and 1 on q side...i.e many instnaces of q are associated with p...
which is the right answer??
class P{
Q q;
}
class Q
{
P[]p;
}
or
class P {}
class Q
{
P[]p;
}
Anand Shrivastava
Ranch Hand

Joined: Jul 22, 2007
Posts: 125
If you say * on p side and 1 on q side

Something like this

P------------Q
*------------1

It means P has one q and Q has 0..* Ps.
In that case your first option would be correct.
[ August 25, 2008: Message edited by: Anand Shrivastava ]

Anand Shrivastava
SCJA
 
 
subject: urgent query on scja uml
 
Similar Threads
assigning int types to a boolean expression
Exception in thread "main" java.lang.StackOverflowError
Casting Boolean
How to modify this program to use & display 1s and 0s instead of true and false?
truth table