Software engineering
Software engineering
1. Objective (s):
After completing this experiment, student will be able to:
Identify different actors and use cases from a given problem statement
Associate use cases with different types of relationships
Draw a use-case diagram
2. Theory:
Use case diagrams
Use case diagrams belong to the category of behavioural diagram of UML
diagrams. Use case diagrams aim to present a graphical overview of the
functionality provided by the system. It consists of a set of actions (referred to as
use cases) that the concerned system can perform, one or more actors, and
dependencies among them.
Actor
An actor can be defined as an object or set of objects, external to the system,
which interacts with the system to get some meaningful work done. Actors
could be human, devices, or even other systems.
For example, consider the case where a customer withdraws cash from an ATM.
Here, customer is a human actor.
Actors can be classified as below:
Primary actor: They are principal users of the system, who fulfil their goal
by availing some service from the system. For example, a customer uses an
ATM to withdraw cash when he needs it. A customer is the primary actor
here.
Supporting actor: They render some kind of service to the system. "Bank
representatives", who replenishes the stock of cash, is such an example. It
may be noted that replenishing stock of cash in an ATM is not the prime
functionality of an ATM. In a use case diagram primary actors are usually
drawn on the top left side of the diagram.
Use Case
Department of Information Technology
Medi-Caps University
1
IT3CO36: Software Engineering Experiment no- 3
Experiment Title: Modeling UML Use Case Diagrams and Page 2 of 7
Capturing Use Case Scenarios
A use case is triggered by an actor. Actors and use cases are connected through
binary associations indicating that the two communicates through message
passing.
An actor must be associated with at least one use case. Similarly, a given use
case must be associated with at least one actor. Association among the actors are
usually not shown. However, one can depict the class hierarchy among actors.
Use Case Relationships
Three types of relationships exist among use cases:
Include relationship
Extend relationship
Use case generalization
Using Subclasses
Here, instead of identifying objects one goes for identification of classes based
on some similar characteristics. These are the specialized classes. Common
characteristics are taken from them to form the higher level generalized classes.
Include Relationship
Include relationships are used to depict common behaviour that are shared by
multiple use cases. This could be considered analogous to writing functions in a
program in order to avoid repetition of writing the same code. Such a function
would be called from different points within the program.
Example
For example, consider an email application. A user can send a new mail, reply to
an email he has received, or forward an email. However, in each of these three
cases, the user must be logged in to perform those actions. Thus, we could have
a login use case, which is included by compose mail, reply, and forward email
use cases. The relationship is shown in figure 02.
3. Outcome of Study:
4. Output: