• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Trying to understand diagram in Max book

 
Lara McCarver
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In chapter 3 in the Max book (The SCJD Exam with J2SE 1.4), on p. 63 there is a class diagram for the starter project. What I am confused about is the direction of the arrows between DOSClient, DVDDatabase, and DVD. I am trying to understand this simple diagram in the hopes that this will help me to understand the more complicated diagrams that he introduces later. DOSClient uses the DVDDatabase which uses a collection of DVD. Here is the diagram I see in the book:



I think that both the arrows to and from DOSClient and DVD should be reversed, to look like this:



The reason I think this is: the arrow is supposed to point from the class that is doing the using to the class that is being used. Or another way of thinking about it: pointing means that a class knows about the class it is pointing to.

And something else I am wondering about: Why do Collection, Iterator and List have a grey background when the other classes all use white? At first I thought it was because some methods return these objects, but there are no methods in DVDDatabase that return an Iterator, and the DVD class does not have grey coloring even though several methods return DVD objects.

[ May 18, 2005: Message edited by: Lara McCarver ]
[ May 18, 2005: Message edited by: Lara McCarver ]
 
Darya Akbari
Ranch Hand
Posts: 1855
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Lara,

I agree with you. As it seems, Max (Mehran Habibi) did the diagram with some tool. I saw similar diagrams in JBuilder.

So, why the directions of arrows are the way they are and the reason why some collection classes are grey and some are not we should ask the tool vendor.

Regards,
Darya
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic