[Bluej-discuss] Uses arrows in BlueJ class diagrams

Axel Schmolitzky schmolit at informatik.uni-hamburg.de
Mon Jan 22 18:24:20 GMT 2007


Wow, fast answer, I expected this to be a tougher one...     ;-)

> In my personal teaching, I don't talk much about the diagram. I  
> always liked the diagram to be very simple, so that I do not need to  
> talk about it. But maybe people who like this distinction are in the  
> majority. This should be possible. One drawback I see is puzzled  
> students who start to wonder why the arrows are different.

Well, this should be true for the inheritance arrows as well, then. 
These are shown dashed or solid, depending on the relationship (class 
implementing interface, class extending class, interface extending 
interface). None of my students complained about it so far. It is a 
detail easy to ignore; but as soon as you know about the details you 
wish they would be consistent with UML.

> (One of the drawbacks of any interface change like this is always  
> that a lot of documentation -- screenshots in books, etc. -- needs to  
> be changed. It's a lot of work...)

This is a strong point, actually! I translated "Objects First" into 
German, such a change would mean trouble just there...
> 
> 3. Michael's suggestion of multiplicity. Arrows should indicate a  
> collection attribute. I can see how this can be helpful for everyone  
> who teachers with a model focus, and probably also in other contexts.  
> I am not sure yet about the bafflement/benefit ratio.

I just imagine the class diagram in chapter 3 of OF, in Figure 3.3 
(ClockDisplay and NumberDisplay), as an example; it would look great 
with a star (which would be different from option 4 by Charles, but 
simpler).

>   - inheritance
>   - aggregation (a.k.a. structural dependency) -- a solid line
>   - association ("simple dependency") -- a dashed line
> 
> We could keep the "draw inheritance" arrow and also have a "draw  
> aggregation" arrow. If the aggregation is drawn, it would insert a  
> field declaration into the source code. (I am not sure whether this  
> is a good idea. It is tricky: where exactly do you place it? What  
> should the field be called?)

Sounds good to me. I am sure you will find a good solution to the detail 
questions.  :-)

> Alternatively, if we do not want to draw aggregations, I am really  
> not sure whether we want to keep the inheritance arrow button.

Keep both buttons, for marketing sake. It is part of BlueJ's face...
> 
> The multiplicity option could be an option: it could selectively be  
> switched on and off via a preference setting.

Great! I would be happy with all of the above. Can't wait until it is done.

	Axel


More information about the bluej-discuss mailing list