aspose file tools*
The moose likes Associate Certification (SCJA,OCAJ 5/6) and the fly likes Some doubts (various topics) 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 "Some doubts (various topics)" Watch "Some doubts (various topics)" New topic
Author

Some doubts (various topics)

Swapnil Sonawane
Ranch Hand

Joined: Jan 02, 2008
Posts: 190
I am about to give SCJA exam in the next week. I have the following doubts:

1) Composition relationship: In a UML diagram, composition relationship is shown by a filled diamond at the end of the line. And this diamond is near to the end of the class the instance of which said to be composed of the other. To simplify, I take an example from the popular UML pdf for SCJA. Consider the relationship between book and page. According to the pdf, in the UML diagram, there is a filled diamond at the end of the line and attached to the book diagram. It means that a book is composed of pages. Now, I have one example from ucertify simulator. According to the UML diagram and explanation they have given, a diamond is attached to the pond and the composition relationship is between pond and fish. They say that pond is a part and fish denotes the whole and the whole cannot exist without its parts. But shouldn't pond be the whole as it is composed of fish. Can this be explained? And actually as I knew, parts cannot exist without the whole. How can a department exist without university if there is a composition relationship between them?


2) There are questions on connection interface of JDBC in ucertify SCJA mock simulator. Is it required to know these details? I think high-level overview doesn't include them.

3)There are questions on StringBuffer. Again, is this in the syllabus?

Thanks in advance.


Swapnil S. Sonawane<br /> <br />B.Tech (Expected May 2009)<br />Computer Science, NIT Durgapur, India<br />SCJA 1.0
Rory Thomas
Greenhorn

Joined: Apr 17, 2008
Posts: 27
Originally posted by Swapnil Sonawane:
I am about to give SCJA exam in the next week. I have the following doubts:

1) Composition relationship: In a UML diagram, composition relationship is shown by a filled diamond at the end of the line. And this diamond is near to the end of the class the instance of which said to be composed of the other. To simplify, I take an example from the popular UML pdf for SCJA. Consider the relationship between book and page. According to the pdf, in the UML diagram, there is a filled diamond at the end of the line and attached to the book diagram. It means that a book is composed of pages. Now, I have one example from ucertify simulator. According to the UML diagram and explanation they have given, a diamond is attached to the pond and the composition relationship is between pond and fish. They say that pond is a part and fish denotes the whole and the whole cannot exist without its parts. But shouldn't pond be the whole as it is composed of fish. Can this be explained? And actually as I knew, parts cannot exist without the whole. How can a department exist without university if there is a composition relationship between them?


2) There are questions on connection interface of JDBC in ucertify SCJA mock simulator. Is it required to know these details? I think high-level overview doesn't include them.

3)There are questions on StringBuffer. Again, is this in the syllabus?

Thanks in advance.


I agree, Pond to Fish seems reversed at best, and in fact seems like association really (although I guess in the real word the fish would die without the pond!)

Hope neither 2 nor 3 are on it, although I guess StringBuffer is probably a quick study if needed!

I'll wait and see if someone more informed chimes in!


SCJP February 2010, SCJA June 2008
Swapnil Sonawane
Ranch Hand

Joined: Jan 02, 2008
Posts: 190
We need not visualize the relation here, as they have given the relation with the UML diagram as I described earlier.
Kurt Hahn
Greenhorn

Joined: May 28, 2008
Posts: 3
Originally posted by Swapnil Sonawane:
I am about to give SCJA exam in the next week. I have the following doubts:

It means that a book is composed of pages. Now, I have one example from ucertify simulator. According to the UML diagram and explanation they have given, a diamond is attached to the pond and the composition relationship is between pond and fish. They say that pond is a part and fish denotes the whole and the whole cannot exist without its parts. But shouldn't pond be the whole as it is composed of fish. Can this be explained? And actually as I knew, parts cannot exist without the whole. How can a department exist without university if there is a composition relationship between them?



Hi,
I'm also preparing for this exam, so here's what I found on composition:
my book says two criteria are needed so there is composition (and not only aggregation) in such a relationship:
- obviously, they seem to have reversed the whole and the parts, but in your example, there is composition if a fish can be in only ONE pond, which is the case (in a different example, a wall could be a part of two rooms, so no composition).
- secondly, as you've stated, the fish cannot exist without the pond, so, according to my book, it is composition... In my humble opinion, that would be the same for a department, which can't continue to exist if its university is destroyed...
Swapnil Sonawane
Ranch Hand

Joined: Jan 02, 2008
Posts: 190
Thanks for your replies.
Maniganda Prakashh
Greenhorn

Joined: Oct 01, 2005
Posts: 9
You have mentioned that diamond symbol is attached to the POND, and it is absolutely right that POND is composed of FISH. I don't find anything wrong in that.
Swapnil Sonawane
Ranch Hand

Joined: Jan 02, 2008
Posts: 190
I said the same thing
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Some doubts (various topics)