From: www.itworld.com

Get Off My Case

by David Wall

June 11, 2002 —

 

You can't get far in software engineering without encountering use case
diagrams. Use case diagrams, part of Unified Modeling Language (UML),
are graphical representations of what a particular system element --
typically, a system's human or machine user -- can do with that system.
Furthermore, it illustrates the dependencies of the features that are
exposed to the user. They're often used to design new software systems
-- implemented in Java and otherwise -- and to document existing ones.

For example, consider a simplified airplane as an example of a complex
system. The simplified airplane has a pilot, which is a user that can
interact with the airplane in various ways, and an autopilot system,
which can interact with the airplane in some of the same ways as the
human pilot. In a use case diagram, a user of the system being
diagrammed (whether human or machine) is called an actor. Both the
autopilot and the human flyboy are actors, the only difference being
that a stick-figure icon and a name ("pilot") would designate the pilot
and the label "<>" and a name ("autopilot system")would denote
the autopilot system. How about that as a nod to sentient beings?

Anyway, our actors can do things with the airplane system. For example,
they can both maintain the plane's altitude. More specifically, they can
manipulate the plane's elevator surface. Elevators only do two things
(deflect up and deflect down), so we have two possible use cases for our
actors now:

* Deflect Elevator Up
* Deflect Elevator Down

How do the actors know which way to deflect the elevator and by how
much? They need to look at the plane's altimeter to determine if it's
strayed from the desired altitude. The two elevator use cases, then,
have a dependency use case:

* Evaluate Altimeter Reading

Implicit in that statement, perhaps obviously, is the case of looking at
or otherwise getting information from the altimeter and comparing it
against some established target altitude value. Implicit in having an
established target altitude value is a means of setting it. And so
on.... Use case diagrams essentially are tools for reducing a problem to
pieces small enough to tackle easily. That's tremendously valuable on a
big distributed Java project.