Unified Modelling Language

UML is the software engineering industry standard way of implementing design patterns in what is known as the Unified Process. We will learn about use case models and UML in that context rather than just memorizing diagrams. You may review Craig Larman's browser based course, Applying UML & Patterns Training (2nd Edition). Churchill students are expected to apply use cases and UML modelling in planning and documenting their IB dossier program.

A great tool for generating textual analysis such as User Stories (use cases) and UML diagrams is the commercial product, Visual Paradigm for UML (VP-UML). Students may download and use the standard edition of VP-UML at home, either one or both of the stand alone version and Eclipse integrated version by using Churchill's Visual Paradigm Academic Partner License. VP-UML provides great tutorials both within the application and at their online Visual Paradigm for UML Learning Center.

Visual Paradigm for UML (VP-UML)

Caution: Visual Paradigm for UML is powerful and rich, but has a steep learning curve. You may do all UML diagrams that are required for this course with EclipseUML and UMLet.

Unified Modelling Language (UML) is the industry-wide method for drawing diagrams and otherwise designing a program before and during the writing of the source code. UML may be learned and applied using Visual Paradigm for UML (VP-UML) Standard Edition.

Computer science students of Sir Winston Churchill High School are granted a full working version of Visual Paradigm for UML (VP-UML) Standard Edition, Smart Development Environment Standard Edition for Eclipse and free upgrades to the latest version during the membership period. Sir Winston Churchill students may get a license that is good for the duration of the membership year by giving their request and email address to Mr. Donaldson. Churchill's students should go to Visual Paradigm Academic Partner link to download the correct versions granted under the partnership.

Visual Paradigm for UML (VP-UML) Standard Edition

Visual Paradigm for UML (VP-UML)

Visual Paradigm for UML (VP-UML)

From UMLet's Web Site: "UMLet is an open-source Java tool for rapidly drawing UML diagrams with a light-weight, pop-up-free user interface. UMLet lets you draw diagram sketches fast; export diagrams to eps, pdf, jpg, svg, and system clipboard; share diagrams using Eclipse; and create your own custom graphical elements."

A number of years ago VISIO was the premier charting tool on the market. Then MicroSoft bought it. It is still a great tool. Now it is MicroSoft Visio 2003. Those wishing to use it for UML can get a Visio Stencil and Template for UML 2.0 from the Pavel Hruby Web Page, Visio Stencil and Template for UML 2.0.

[Smartdraw.com Logo]

SmartDraw offers clear, brief explanations and examples of the UML diagrams as part of a tutorial. They also offer a 30-day free trial during which you may make UML diagrams using SmartDraw. Specific explanation and diagrams will be found at:

  1. Class Diagrams
  2. Package Diagrams
  3. Object Diagrams
  4. Use Case Diagrams
  5. Collaboration Diagrams
  6. Statechart Diagrams
  7. Activity Diagrams
  8. Component Diagrams
  9. Deployment Diagrams

UML For JAVA Programmers

UML For JAVA Programmers is precisely the book that I have been looking for to guide the level and types of UML diagrams that our students in the International Baccalaureate program might fruitfully learn and apply without becoming overwhelmed with what has become 800 pages of the diagramming documentation standard for all OOP languages.

Robert Martin, the author, argues that it is just as important to decide when not to use UML as when to apply it. Furthermore, he presents only those diagrams that are used most of the time when implementing Java code. Indeed, he completely avoids conceptual level UML and focuses exclusively on the specification and implementation levels and their corresponding UML diagrams, which is good because that is precisely where our students must perform.

Indeed, in Chapter 1 of UML For JAVA Programmers Martin argues that five types of UML diagrams "are enough for most purposes. Most programmers could live without any more knowledge of UML than what is shown here." [page 8] What are those five diagrams?

  1. Class Diagram: shows the major classes and relationships in the program.
  2. Object Diagram: shows a set of objects and relationships at a particular moment in the execution of the system. You can view it as a snapshot of memory.
  3. Sequence Diagram: describes how a particular method is implemented, clarifying the order of the messages.
  4. Collaboration Diagram: contain the same information that sequence diagrams contain, but clarify relationships between the objects.
  5. State Diagram: provides notation for finite state machines, useful for figuring out how a system behaves.
TaskTopicAssignments

1

Learn About UML

A great intro is: Introduction to the Unified Modeling Language [pdf]

Donald Bell wrote a great intro in 2003: UML basics: An introduction to the Unified Modeling Language [csg] [web]

UML 2 Activity Diagramming Guidelines is short and to the point. Very nice.

Become acquainted with UML by reading Bobby Mathew's short (10 page) article, UML Tutorial (pdf).

TaskTopicAssignments

2

Install EclipseUML

Eclipse UML is an Eclipse plug-in developed by Omondo. There is a free edition and a studio edition of Eclipse UML. The free edition will cover the modeling needs for this course.

  1. Download the auto-installer jar file for Free EclipseUML or EclipseUML Studio. EclipseUML Studio requires a license that must be purchased. Free EclipseUML is sufficient for purposes of this course.

  2. Double click the jar file, which will then run an installer program. This will install Eclipse UML as a plug-in. If you browse to find the location of the eclipse root directory on your particular machine, choose only the eclipse root directory, not the plugin directory. Eclipse will find the plugin directory itself once you browse to the eclipse root directory.

  3. An auto-installer jar file contains everything needed to run EclipseUML. It automatically installs EMF (Eclipse Modeling Framework), GEF (Graphical Editor Framework), and UML2. Contrary to earlier directions that you may have seen elsewhere, you need not install other plugins for EclipseUML to function correctly.

TaskTopicAssignments

*

Activity Diagram

The Activity Diagram is not part of the Eclipse UML set of UML Diagrams, perhaps because UML has evolved and other diagrams better do what the Activity Diagram did, but it is worth consideration.

  1. Great overview of the UML Activity Diagram is Donald Bell's UML Basics (Part II) - The activity diagram

  2. Louisiana State University's 1998 course ISDS 7525 is informative: Activity Diagrams

TaskTopicAssignments

3

*.ucd

Class Diagram
By Reverse Engineering
Code to Diagram

Class Diagram Illustrated
Class Diagram Associations Only - Deitel 140
Class Diagram Including Attributes & Operations - Deitel 517

Here you will cause Omondo's EclipseUML to make a UML class diagram from the existing source code of a program called CoffeeMaker.

Formative evaluation is best practice rather than summary evaluation.

Formative evaluation is the evaluation of a design while "forming" (coding) the design. When improvements or errors are identified, both the design and code should be modified as soon as reasonably possible to enhance the program. Formative evaluation is best practice.

Summative evaluation is the evaluation of a design after the coding is completed. Changes in design are not permitted before completion. Summative evaluation is worst practice. Much preferred, more successful and less costly is the continual correction through formative evaluation.

First, design your program using a class diagram as best you can. Then, after the initial draft of the class diagram is designed, write source code that implements the class diagram. You often think of other classes or identify errors or improvements in design while coding.

It is appropriate while coding to modify both the design and source code of a program, including modifying planning instruments such as a UML class diagram.

  1. Great overview of the UML Class Diagram is Donald Bell's UML Basics (Part III) - The class diagram

  2. Read the NCSU Class Diagram Tutorial.csg web

  3. Import the CoffeeMaker project into your workspace. Reverse engineer the class diagram of the project. Be sure to first right click the package icon.

  4. From within Eclipse, go to Help --> Help Contents --> Eclipse UML User Guide --> Getting Started. This was automatically installed when you installed EclipseUML. Carefully read the EclipseUML tutorial Creating a First Diagram.

    • Class Diagram Creation
    • Classes and Interfaces
    • Attributes
    • Methods
    • Implementation and Inheritance

    Note that you must generate the associations yourself.

  5. Practise using EclipseUML with class diagrams. Similar key-push techniques are used to create other UML diagrams in EclipseUML.

TaskTopicAssignments

4

*.uud

User Stories
Use Cases
Use Case Diagram

Use Case Diagram Illustrated

Do the User Stories first, then draw the Use Case Diagram. Each "bubble" in the Use Case Diagram should correspond to a User Story.

Listen to a great talk and slide show by by Jim Heumann, Requirements Evangelist, IBM Rational Writing Good Use Cases (76:34)

From the book, Use-Case Modeling, two chapters have been published on the Internet at IBM's Rational. They are worth perusing.

Print the handout, Negotiating the Exercise html pdf wpd

The making of this handout was prompted when, on 7 December 2005, there was significant confusion over the precise sequence of tasks and key pushes in order to negotiate the following exercise. This handout provided the needed clarification.

  1. Read the NCSU Use Case Diagram Tutorial. csg web

  2. Load and print (as in hard copy) and study the CoffeeMaker User Stories and sample Use Case Diagram in anticipation of the next assignment. That is, this is the "answer" to the next assignment below. Use is as a model to how you may write user stories and a sample use case diagram.

    The "user stories" are less accurately but more famously known as "case uses".

  3. Import the CoffeeMaker project into your workspace. Create a use case diagram that models the requirements of the system. (Hint: This has already been done for you in the already downloaded CoffeeMaker User Stories and sample Use Case Diagram.)

  4. From within Eclipse, go to Help --> Help Contents --> Eclipse UML User Guide --> Diagrams --> Use Case Diagram. This was automatically installed when you installed EclipseUML. Carefully read the EclipseUML tutorial Use Case Diagram.

    • Concept
    • Toolbar
    • UseCase Diagram Example

  5. Using the already downloaded CoffeeMaker User Stories and sample Use Case Diagram, create (redo) the same Use Case Diagram. It will give you valuable practice in creating a UseCase Diagram using EsclipseUML.

TaskTopicAssignments

5

*.usd

Sequence Diagram

Sequence Diagram Illustrated
  1. Read the NCSU Sequence Diagram Tutorial.csg web

  2. From within Eclipse, go to Help --> Help Contents --> EclipseUML User Guide --> Diagrams --> Sequence Diagram. This was automatically installed when you installed EclipseUML. Carefully read the EclipseUML tutorial Sequence Diagram.

    • Concept
    • Drag'n'Drop
    • Toolbar
    • Reverse Engineering
    • Extension
    • Filtering
    • Sequence Diagram Example

TaskTopicAssignments

6

*.uld

Collaboration Diagram

Collaboration Diagram Illustrated
  1. From within Eclipse, go to Help --> Help Contents --> EclipseUML User Guide --> Diagrams --> Collaboration Diagram. This was automatically installed when you installed EclipseUML. Carefully read the EclipseUML tutorial Collaboration Diagram.

    • Concept
    • Drag'n'Drop
    • Toolbar
    • Collaboration Diagram Example

TaskTopicAssignments

7

*.upd

Robustness Diagram

Robustness Diagram Illustrated
  1. From within Eclipse, go to Help --> Help Contents --> EclipseUML User Guide --> Diagrams --> Robustness Diagram. This was automatically installed when you installed EclipseUML. Carefully read the EclipseUML tutorial Robustness Diagram.

    • Concept
    • Robustness Diagram Example

TaskTopicAssignments

8

*.utd

State Diagram

State Diagram Illustrated
  1. Read the NCSU State Diagram Tutorial.csg web

  2. From within Eclipse, go to Help --> Help Contents --> EclipseUML User Guide --> Diagrams --> State Diagram. This was automatically installed when you installed EclipseUML. Carefully read the EclipseUML tutorial State Diagram.

    • Concept
    • Toolbar
    • State Diagram Example

TaskTopicAssignments

9

*.upd

Component Diagram

Component Diagram Illustrated
  1. From within Eclipse, go to Help --> Help Contents --> EclipseUML User Guide --> Diagrams --> Component Diagram. This was automatically installed when you installed EclipseUML. Carefully read the EclipseUML tutorial Component Diagram.

    • Concept
    • Drag'n'Drop
    • Toolbar
    • Component Diagram Example

TaskTopicAssignments

10

Object Diagram

  1. From within Eclipse, go to Help --> Help Contents --> EclipseUML User Guide --> Diagrams --> Object Diagram. This was automatically installed when you installed EclipseUML. Carefully read the EclipseUML tutorial Object Diagram.

    • Concept
    • Toolbar

TaskTopicAssignments

11

*.udd

Deployment Diagram

Deployment Diagram Illustrated
  1. From within Eclipse, go to Help --> Help Contents --> EclipseUML User Guide --> Diagrams --> Deployment Diagram. This was automatically installed when you installed EclipseUML. Carefully read the EclipseUML tutorial Deployment Diagram.

    • Concept
    • Toolbar
    • Deployment Diagram Example

TaskTopicAssignments

12

Documentation Generation
JavaDoc w/ UML Diagrams

Javadoc With UML Diagrams Illustrated
  1. Read the NCSU Javadoc Tutorial.csg web

  2. From within Eclipse, go to Help --> Help Contents --> Java Development User Guide --> Tasks. This was automatically installed as was the JDT (Java Development Tools) when Eclipse was installed. Carefully read the Eclipse tutorial Creating Java Documentation.

    • Selecting types for Javadoc generation
    • Configuring Javadoc arguments for standard doclet
    • Configuring Javadoc arguments

  3. From within Eclipse, go to Help --> Help Contents --> Java Development User Guide --> Reference --> Wizards --> Javadoc Generation. This was automatically installed as was the JDT (Java Development Tools) when Eclipse was installed. This is a user interface for the javadoc.exe tool available in the Java JDK, which allows you to generate Javadoc Generation.

  4. From within Eclipse, go to Help --> Help Contents --> EclipseUML User Guide --> Documentation Generation. This was automatically installed when you installed EclipseUML. Carefully read the EclipseUML tutorial Documentation Generation.

    • Launching the Documentation Generation
    • Templates
      • Content
      • Format

Primary Sources:

URL:   http://www.comscigate.com/    Last Revised:  December 18, 2005