Use Case Diagrams
Citra N., MT
Definition
• A diagram use case is typical interaction between a
user and the system under development. It is used
to capture some functionality to be provided by the
software system.
• A use case is a usage of the system that provides an
observable and (usually) meaningful result. The use-
case documentation (diagrams and/or text) should
delineate the series of steps that take place during
the interaction and include different ways that this
interaction could play out.
• use cases are used to document our understanding
of the way a business operates – business
requirements modeling – and to specify what our
new software system should be able to do – system
requirements modeling.
• The business use cases can use an informal,
descriptive style: they describe, for the benefit of
nonexperts, something that already exists. The
system use cases, on the other hand, will be more
prescriptive: they specify, mainly for the benefit of
software developers, exactly what functionality
needs to be implemented.
Notation
• System : sets the boundary of the system in relation
to the actors who use it (outside the system) and the
features it must provide (inside the system)
• Actor : A role played by a person, system or device
that has a stake in te succesful operation of the
system.
• Use case : Identifies a key feature of the system.
Without these features, the system will not fulfill the
user/actor requirements, each use case expresses a
goual the system must achieve.
• Association : Identifies an interaction between
actors and use cases, each association becomes a
dialog that must be explained in a use case
narrative. Each narrative in turn provides a set of
scenarios that function as test cases when evaluating
the analysis, design and implementation of the use
case
Actors
• In this step, you identify the IT system’s users, or
actors. An actor specifies a role played by a user or
any other system that interacts with the subject
• An actor is a type of user or an external system that
interacts with the system under design
• External agent/external entity: Equivalent
terms used in structured analysis.
• Stakeholder: A term more inclusive than actor as
it includes anyone who the project will affect even if
they do not have direct contact with it.
Use-case Relationship
• Specializes: Just like actors, use cases can inherit from each other. In order
to avoid all sorts of complexity relating to the redefinition of steps and the
addition of extra ones.
• Include: Extract the common requirements into a ―mini use case.‖ The main
use cases are said to include this mini use case. This approach is useful
whenever a set of steps appears in more than one system use case.
• Extend: You leave one main system use case intact and create a new use
case that extends the original one. The extending use case contains only the
requirements that differ from the original. This approach is useful, for
example, for enhanced versions of earlier software releases.
• Generalization: You create a new generalized use case that contains general
rules. Other use cases are created as ―specializations‖; they contain the non-
generic requirements. This approach is useful when a set of system use
cases represents variations on a theme
2
The Benefits of Use Cases
• Relatively easy to write and easy to read
• Comprehensible by users
• Engage the users in the requirements process
• Force developers to think through the design of a system from a user viewpoint
• Identify a context for the requirements of the system
• Critical tool in the design, implementation, analysis and testing process
• Rapid change allows exploratory approach
• Serve as inputs to the user documentation
Massimo Felici Use Cases c 2004–2011
3
Use Cases: Strengths and Weaknesses
• Strengths
– Capture different actors views of the system
– Capture some structures in requirements
– Are comprehensible by naı̈ve users
• Weaknesses
– Lack of non-functional requirements
– Lack of what the system shall not do
Massimo Felici Use Cases c 2004–2011
4
Use Cases at a Glance
Generalization
Massimo Felici Use Cases c 2004–2011