[Bluej-discuss] Uses arrows in BlueJ class diagrams
Lon Levy
LXL at oregon.k12.wi.us
Mon Jan 22 18:30:47 GMT 2007
Hi Michael,
Your solution sounds good. As to placement of insertion of a field
declaration, that is fairly easy. Place a line of documentation and
then the field declaration immediately after the curly braces at the
start of the class (right up top, where it is easy to find). Give the
field an arbitrary name, something like x22JAN0701 (an x followed by the
date and 01 for the first field added this way) and the documentation is
something like
// Square x22JAN0701 instance field added via the diagram.
so that there is some clue as to where it came from for students who
are exploring the BlueJ IDE for the first time.
I think this would be useful for my students.
Many thanks, as always, for this great tool!
Lon.
Lon Levy, MS-CSEd
Computer Science Teacher
Volunteer Computer Club Advisor
Oregon High School
608-835-4469
lxl at oregon.k12.wi.us
non somnos requiem
>>> Michael Kölling <M.Kolling at kent.ac.uk> 1/22/2007 4:24 AM >>>
Okay, now to a possible solution:
If 1 and 2 were combined, we can almost reintroduce the second "draw
arrow" button. We would have three kinds of relationship:
- 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?)
Association arrows cannot be drawn and are inferred. (Currently
arrows are only updated when a source file is saved. This is why they
can get out-of-date if manually removed. They should also be updated
on 'compile').
Alternatively, if we do not want to draw aggregations, I am really
not sure whether we want to keep the inheritance arrow button.
The multiplicity option could be an option: it could selectively be
switched on and off via a preference setting.
How's that?
More information about the bluej-discuss
mailing list