5.4 Reverse Engineering

5.5 Class Diagrams

To extract the design diagrams from the BETA code, the program is opened in the CASE tool. Consider the following program shown in the code editor:

[16kb 717x553 GIF]

When opening this program in Freja the following diagram initially appears:

[11kb 612x331 GIF]

This is an abstract design view of the program. A detailed design diagram can be obtained by detailing selected parts of the diagram. If an entry contains three dots (...) it can be detailed. Below the class Reservation is detailed by double-clicking on the Reservation attribute:

[12kb 612x331 GIF]
This intial layout of course can be changed to make the diagram appear graphically more appealing. To prevent the shown association connectors from crossing over the class boxes, point the mouse cursor to a connector and right-click it to get a popup-menu:

[14kb 612x331 GIF]
Select the checked item, Attach Reservation Role Right, to make one end of the connector attach itself to the left side of the class instead of the right. Repeat this operation to change the other points of attachment of the two connectors, to make the diagram look like this:

[12kb 612x331 GIF]
To prevent the two connectors themselves from intersecting one of the endpoints has to be moved. Right-click the attribute theAgent of the Reservation class:

[15kb 713x331 GIF]
Select Move:Down to move the attribute one position down in the class box:

[12kb 713x331 GIF]
To further visually seperate the two connectors, you might want to bend one connector away from the other. This can be done by inserting a new edge somewhere on the line constituting the connector you wish to bend. To do this, double-click the connector in the place where you want the new edge inserted:

[11kb 573x338 GIF]
A small rectangular dot appears where the edge was inserted and this new dot can now be dragged to a new position to obtain the desired bending of the connector:

[11kb 573x338 GIF]
Further classes may be detailed and the layout adjusted in ways similar to above.


Mjolner Integrated Development Tool - Tutorial
© 1991-2002 Mjølner Informatics
[Modified: Friday October 27th 2000 at 14:56]