An Introduction to ArgoUML

This laboratory exercise introduces a UML environment, called ArgoUML, that will be used as a tool to support the projects in this course.

The first part of this lab will involve experimenting with ArgoUML , and learning the interface. The second part will take you to a ArgoUML tutorial, where you will create a some Class definitions, which your will save and turn into Moodle.

Why UML?

As you know from reading, UML is a widely used framework for the development of specifications and the design of programs using an object-oriented approach for problem solving. At a simple, conceptual level, UML seeks to provide support for three basic functions:

  • Class Diagrams: the definition and design of classes,
  • Sequence Diagrams/Use Cases: the use of well-defined messages messages to direct processing from object to object, with clearly-defined return values
  • Code Generation: the translation of UML to a programming language to facilitate programming in a specified target language.
At a commercial level, several sophisticated (and expensive) software packages provide extensive frameworks for the development of UML diagrams. For example, one of the most extensive and popular UML environments is Rational Rose from IBM.


Within the open-source community, ArgoUML represents a major cooperative effort for the development of a UML development environment, and we will use ArgoUML in this course. As you will see, ArgoUML is still under development, and processing errors arise periodically. Thus, you will want to save your work early and often.

Even with its blemishes, ArgoUML is widely used. For example, ArgoUML was reportedly downloaded about 500,000 times in 2005. We will use ArgoUML version 0.34.

As we will see, the specification of class diagrams is somewhat cumbersome - we need to supply considerable information about the definition of each class. Further, ArgoUML seeks to keep various definitions consistent. At one level, this may seem time consuming; for example, you may need choose types from a menu of already-identified classes. On the other hand, such checking can help catch potential errors early - before you have built code upon them.

While the specification of diagrams takes some time, ArgoUML provides an easy mechanism to produce elements of code. In particular, with a couple clicks from a drop-down menu, ArgoUML will produce a code framework for each class identified.

Since ArgoUML is a large and complex package, this lab focuses on class diagrams (and code generation). A later lab will introduce sequence diagrams and use cases.

Getting Started with UML

Since ArgoUML is written in Java, it is run using the Java interpreter. Open the file argouml.jar with Java.

The Basic Layout of the ArgoUML Interface

ArgoUML's startup page is shown below:


As this picture shows, the top level of an ArgoUML window contains common drop-down menus (e.g., File, Edit, View, Create, ...). The rest of the window is divided into four main parts:

  • The upper left pane, called the Explorer, allows you to select components of the current UML model. At the start, this consists of an entire project, initially called untitledModel, a blank Class Diagram 1, and a blank Use Case Diagram 1.

  • The upper right pane, called the Editing Pane, provides the graphical interface needed to lay out the boxes, associations, and other elements of a UML diagram.

  • The lower right pane, called the Details Panel, allows you to enter specifics for the various UML elements. When you click on an element of a UML diagram, the relevant properties of that element are displayed, with boxes for you to specify names, attributes, etc.

  • The lower left pane, called the To-Do Pane, keeps track of tasks you want to consider during the development of your UML model. As you work, UML continually monitors what you are doing through a thread, called a design critic, and this thread regularly makes suggestions that appear in this To-Do Pane.

The rest of this lab asks you to experiment with various elements of ArgoUML. These instructions will guide you, as you try several features related to class diagrams.

Class Diagrams

The rest of this lab is devoted to your experimenting with various elements of ArgoUML. These instructions will guide you, as you try several features related to class diagrams. As you proceed, note the following two principles for this lab:

To get started, open ArgoUML from a terminal window, and try these steps:

  1. In the Explorer pane, click on untitledModel, and note the pieces that appear in the Details Pane. Change the name of this package to reflect your software engineering project (but note that as a Java package name, you should use all lower case letters, with no spaces).

    With the new name, use the File menu to save this UML project to a file in your account.

  2. Click on "Class Diagram 1" in the Explorer, and use the Details Pane to give a more descriptive name to this first diagram in your UML model for your software engineering project.

  3. Create a new class using the Editing Pane, with help from the Details Pane. Basic operations are found using the icons at the top of the Editing Pane (some of these are repeated for various elements in the Details Pane). These main operations are annotated in the diagram below:


    1. Click once on the "Create new Class" button (to enter this creation mode), and then click within the Editing Pane where you want to locate a box for this class.
    2. With the class positioned, click the "Select Element" button and then select the newly created class for future reference. (You can accomplish the same selection by selecting the new class element in the Explorer pane.)
    3. Click "Create attribute" to begin the definition of a new field within this class. Edit the field name and the data type within the Detail Pane. Also, check that each field is private or protected, as appropriate. Repeat this process to establish several attributes or fields for this class.
    4. Reminder: Save early and often!
    5. After defining several attributes, establish several new operations with the "Create operation" button. You will need to supply details using the various boxes in the Details Pane, as shown in the following diagram.


    1. When you add a new parameter, give it a method name and establish its type. For Java programming, parameters should be identified as being "in".

  1. After entering one class:

    1. Reminder: Save early and often!
    2. Go on to define a few more classes (at least 3 altogether).


Your software engineering project may involve at least one collection (e.g., Vector, Hashtable).

  1. Be sure the classes already defined include this collection.

  2. To establish relationships among classes, click on the class in the Editing Pane, keeping your mouse within the class's rectangular area. This will make visible links on the sides of the class rectangle for generalizations, specializations, and associations, as shown in the following diagram.


  1. Use the left mouse button to select the relevant relationship from this box, and (keeping the button down) move to the relevant superclass, subclass, or association.

    In the detail box, click on the first association end (the top line) or the second association end (the second line) to provide details on the multiplicity and properties of both parts of this association.

  2. Did you remember to save again (and again)?

  3. Optional: Use the Generation menu to create skeleton Java code for the classes you have defined.

Creation of class diagrams tutorial

  1. Follow this linked to a tutorial on Building a Class Diagram in ArgoUML
  2. Complete the Tuturial
  3. Save BOTH as a project and a graphic file (.png)
  4. Upload the .png to your personal section of wiki so it can be viewed
  5. Turn in both the project on Moodle under lab, as well as a link to the diagram on the Wiki.

-- JimSkon - 2012-02-18

Topic revision: r1 - 2012-02-18 - JimSkon
This site is powered by the TWiki collaboration platformCopyright &© by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback