You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
DRAFT, February 18, 2003, Page 50<br />
5 UML Class Diagrams and Object Workbench<br />
Java programs usually involve multiple classes, and there can be many dependencies among these<br />
classes. To fully understand a multiple class program, it may be necessary to keep track of the interclass<br />
dependencies. Although this can be done mentally for small programs, it is usually helpful to see these<br />
dependencies in a class diagram. jGRASP provides for the automatic generation of class dependency<br />
diagrams based on the Unified Modeling Language (UML). Since a UML class diagram is based on<br />
multiple classes, jGRASP utilizes the “Project” to determine which user classes to include.<br />
(1) In order to generate a meaningful UML diagram, you must create a jGRASP project file (.gpj) as<br />
described in the previous section. You should include all of your source files (.java) in the project, and<br />
you may optionally include other files (e.g., .class, .dat, .txt, etc.).<br />
(2) The information jGRASP uses to generate the UML is located in the .class files. Recall, .class files<br />
are generated when you compile your Java program files. Therefore, you must compile your .java files<br />
prior to generating the UML diagram. Note, the .class files do not have to be in the project file, but they<br />
should be in the same directory as the .java files.<br />
The remainder of this section assumes you have created a project file, and that you have compiled your<br />
program files.<br />
5.1 Opening the Project<br />
In preparation for generating the UML class dependency diagram for a particular project, you need to<br />
open that project. There are two ways to open a project.<br />
1) On the Desktop tool bar, click Project – Open Project, and then select the project from the list<br />
of project files displayed in the Open Project dialog as shown in Figure 36.<br />
2) In the Browse pane (tab in the left pane of the Desktop), double-click the project file.<br />
Figure 36. Open Project Dialog