5 - Use Case Modeling
5 - Use Case Modeling
Overview
The models introduced in Chapters 3 and 4 focus on two primary aspects of functional
requirements: the use cases and the problem domain classes involved in users’ work. User stories
are sometimes used in place of use cases with Agile development.
Use cases are identified by using the user goal technique and the Opening case Electronics
Unlimited: Integrating the Supply Chain Electronics Unlimited is a warehousing distributor that buys
electronic equipment from various suppliers and sells it to retailers throughout the United States and
Canada. It has operations and warehouses in Los Angeles, Houston, Baltimore, Atlanta, New York,
Denver, and Minneapolis.
Its customers range from large nationwide retailers, such as Target, to medium-sized
independent electronics stores. Most large retailers have moved toward integrated supply chains.
Information systems used to be focused on processing internal data; however, today, these retail
chains want suppliers to become part of a totally integrated supply chain system. In other words, the
systems need to communicate between companies to make the supply chain more efficient. To
maintain its position as a leading wholesale distributor, Electronics Unlimited has to convert its
system to link with its suppliers (the manufacturers of the electronic equipment) and its customers
(the retailers). It is developing a completely new system that uses object-oriented techniques to
provide these links. Object-oriented techniques facilitate system-to-system interfaces by using
predefined components and objects to accelerate the development process.
Fortunately, many of the system development staff members have experience with object-
oriented development and are eager to apply the techniques and models to the system development
project. William Jones is explaining object-oriented development to the group of systems analysts
who are being trained in this approach. “We’re developing most of our new systems by using object-
oriented principles,” he tells them. “The complexity of the new system, along with its interactivity,
makes the object-oriented approach a natural way to develop requirements. The object-oriented
models track very closely with the new object-oriented programming languages and frameworks.”
William is just getting warmed up. “This way of thinking about a system in terms of objects is very
interesting,” he adds. “It is also consistent with the object-oriented programming techniques you
learned in your programming classes.
A use case description is a textual model that lists and describes the processing details for
a use case.
Fig. 2. Fully developed use case description for Create customer account.
Write a fully developed use case description for more complex use cases. Typical use case
description templates include:
- A use case can have more than one scenario (special case or more specific
path)
• Triggering event
• Brief description
• Actors
• Stakeholders
• Preconditions
• Postconditions
• Flow of activities
• Exception conditions
The clerk is sending a request (a message) to the system to find an item. The input data that
is sent with the message is contained within the parentheses, and in this case, it is data to identify
the item. The syntax is simply the name of the message followed by the input parameters in
parentheses. This form of syntax is attached to a solid line with arrow.
The returned value has a slightly different format and meaning. Notice that the line with arrow
is dashed. A dashed arrow indicates a response or an answer (in programming, a return), and as
shown in the figure, it immediately follows the initiating message. The format of the label is also
different. Because it is a response, only the data that are sent on the response are noted. There is no
message requesting a service—only the data being returned. In this case, a valid response might be
a list of all the information returned—for example, the description, price, and quantity of an item.
However, an abbreviated version is also satisfactory. In this case, the information returned is named
item information. Additional documentation is required to show the details.
Any part of the message can be omitted. In brief, the notation components do the following:
■ Brackets [ ] indicate a true/false condition. This is a test for that message only. If it evaluates
to true, the message is sent. If it evaluates to false, the message isn’t sent.
■ Return-value on the same line as the message (requires :=) is used to describe data being
returned from the destination object to the source object in response to the message.
2. Describe the message from the external actor to the system using the message notation
• Iteration/loop frame
CRUD technique is an acronym for Create, Read/Report, Update, and Delete, a technique to
validate or refine use cases. The CRUD technique is most useful when used as a cross-check along
with the user goal technique. Users will focus on their primary goals and use cases that update, or
archive data will often be overlooked. The CRUD technique makes sure all possibilities are identified.
Sometimes, domain classes are shared by a set of integrated applications.
4. Identify which application has responsibility for each action: which to create, which to
update, which to use
• Use cases
• Activity diagram
• Domain Classes
Fig. 10 illustrates the primary relationships among the requirements models for object-
oriented development. The use case diagram and other diagrams on the left are used to capture the
processes of the new system. The class diagram and its dependent diagrams capture information
about the classes for the new system. The solid arrows represent major dependencies, and the
dashed arrows show minor dependencies. The dependencies generally flow from top to bottom, but
some arrows have two heads to illustrate that influence goes in both directions. Note that the use
case diagram and the domain model class diagram are the primary models from which others draw
information. You should develop those two diagrams as completely as possible.
Thus, the detailed descriptions, activity diagrams, and system sequence diagrams must all
be consistent about the steps of a particular use case. As you progress in developing the system and
especially as you begin doing detailed systems design, you will find that understanding the
relationships among these models is an important element in the quality of your models