Archives for : class diagrams

Minor updates this week

As well as the new world editor, there have been some other small updates to JAKE this week.

Firstly, the graphics have been improved slightly in the JAKE Java library, so that there’s no longer the same stretching and pixelating as before. The wall and beeper icons are now crisper. You can see this in one of the screenshots for the world editor, when compared to a scenario from a few weeks ago:

Secondly, tooltips have been added. The two screenshots below show how tooltips show up in both the world editor and the class diagram. For world editor objects, the tooltip shows the name and type of the object (e.g. “jake (robot)” or “myBeep (beeper)”). For class icons, the tooltip describes this class’s relationship to its parent:

Finally, the WorldObject class has been replaced by “Thing”. This saves any confusion from having the “World” and “WorldObject” classes next to each other in the diagram; we didn’t want it to appear that WorldObject was an instance of World. So, now, all objects in the World are “Things”.

Dynamic class diagrams in JAKE

It’s been noted [e.g. 1] that showing the static class structure is important in teaching materials and tools. BlueJ, for instance, places a lot of emphasis on this.
The JAKE IDE dynamically compiles a class diagram as classes are added to the JAKE program. Every program starts with a default class diagram that shows all the classes in the main JAKE package: World, Mover, Robot, and so on.

The diagram uses a variant UML notation, with arrows for generalisations. The classes themselves, however, don’t have methods or attributes. Instead, they’re represented by a box with an icon and caption.

The class diagram is shown alongside the main program editors in JAKE, but it can also be maximised. In later versions, the maximised diagram could be printed through the File menu. The diagram window automatically scrolls if the diagram becomes too large, but JAKE’s simple class structure makes this unlikely.

[1] Börstler, J., Hall, M. S., Nordström, M., Paterson, J., Sanders, K., Schulte, C. and Thomas, L. An Evaluation of the State-of-the-Art of Object-Oriented Example Programs in Introductory Programming Textbooks. In inroads SIGCSE Bulletin. (July 6-9 2009). ACM New York, NY, USA, , 2009, 126-143.