JMU
Use Case Modeling
An Introduction


Prof. David Bernstein
James Madison University

Computer Science Department
bernstdh@jmu.edu


Use Cases
An Example: Designing a House
Properties of Good Use Cases
Developing Use Cases
  1. Define the context of the system (i.e., the environment)
  2. Identify outside entities that interact with the system (i.e., actors)
  3. Consider the behavior that each actor expects/requires the system to provide
  4. Identify common behaviors (i.e., use cases)
Identifying the Actors
Things to Think About Next
Identifying the Flow of Events
Identifying the Flow of Events (cont.)
Scenarios vs. Use Cases
Use Case Granularity
Use Case Granularity (cont.)
Use Case Diagrams
Using the Unified Modeling Language
Identifying Commonalities/Hierarchies
Association: Examples
images/association2.gif
Specialization/Generalization: Example
images/generalization1.gif
images/generalization2.gif
Example: In-Vehicle Advanced Navigation Assistant (IVANA)
A (Non-Atomic) Needs List

Drivers need IVANA to help get them where they want to go.

IVANA should work with the vehicle's location system (e.g., GPS), programmable display, and speech generation system.

IVANA should display a map and vehicle's location on the programmable display.

The user needs to be able to enter a destination.

IVANA should determine a recommended route, display it on the programmable display, and provide spoken turn-by-turn directions.

Example: IVANA (cont.)

Use Case Diagram

images/ivana_usecases.gif
Use Case Descriptions
Levels of Abstraction
Formatting Use Case Descriptions
An Example in Stimulus-Response Format

From an In-Vehicle Navigation System named IVANA

Enter Destination
(Actors: Driver)


Actor Action System Response

0. This use case begins when the Driver chooses to enter a Destination.

1. The system asks the Driver to select a Destination Type (either an Address or a Location).

2. The Driver selects a Destination Type.

3. The system asks the Driver to enter a Destination.

4. The Driver enters a Destination.

5. If the Destination is a Location the system records it.


If the Destination is an Address the system attempts to geocode it (i.e., determine a Location). If it can, it records the Location. If it can't, this use case re-starts.

An Example in a Linear Format

From a Timetable System named Papyrus

images/use-case-description_papyrus.gif