You are on page 1of 12

08-02-2022

Introduction
Use-cases are descriptions of the functionality of a system
from a user perspective.
 Depict the behaviour of the system, as it appears to an outside
user.
Use Case Diagram  Describe the functionality and users (actors) of thesystem.
 Show the relationships between the actors that use the
system, the use cases (functionality) they use, and the
By relationship between different usecases.
Dr.Pooja Jain  Document the scope of the system.
IIIT Nagpur  Illustrate the developer’s understanding of the user’s
requirements.

1
08-02-2022

Use CaseDiagram, purpose


Use Casediagrams, basic UML notation
Class Activity
diagrams diagrams Use Case: A Use Case is a description of a set of
interactions between a user and the system.
Requirements Sequence
document
(text in naturallanguage)
diagrams Components of use case diagram:
 Actor
Statechart
diagrams  Use case
use casename
• Use case models are developed at different levels of abstraction  System boundary
– system, system component, or aclass.  Relationship
use casename
• Use case modelling is an iterative and incremental process.
– If user requirements change, the changes should be made in all the
affected documents. use casename

2
08-02-2022

Use cases: Information captured ACTOR


• Actors  An actor is some one or something that must
interact with the system underdevelopment
• Relationships with other usecases
 Actors can be human or automated systems.
• Pre-conditions  Actors are not part of the system.
• Details  UML notation for actor is stickman, shownbelow.
• Post-conditions
• Exceptions
• Constraints
• Alternatives
Student Faculty Employee

3
08-02-2022

ACTOR(contd..) Primary and SecondaryActors


• It is role a user plays with respect to system. • Primary Actor
– Acts on the system
– Initiates an interaction with thesystem
• Actors carry out use cases and a single actor – Uses the system to fulfill his/hergoal
may perform more than one use cases. – Events Something we don’t have control over
• Secondary Actor
– Is acted on/invoked/used by the system
• Actors are determined by observing the direct
– Helps the system to fulfillsits goal
uses of the system – Something the system uses toget its job done

4
08-02-2022

USECASE Contd..
What is USE case?
A use case is a pattern of behavior, the system • A use case typically represents a major piece of
exhibits functionality that is complete from beginning to end.
• Most of the use cases are generated in initial phase,
The use cases are sequence of actions that the but may add some more after proceeding.
user takes on a system to get particulartarget • A use case may be small or large. It captures a broad
USECASE is dialogue between an actor and the view of a primary functionality of the system in a
system. manner that can be easily grasped by non technical
• Examples: user.
Add a course

5
08-02-2022

SystemBoundary Relationship
• Relationship is an association between use case and actor.
 It is shown as a rectangle. • There are several Use Case relationships:
 It helps to identify what is external versus internal, and
what the responsibilities of the system are.  Association
 The external environment is represented only by actors.
 Extend

 Generalization

 Uses

 Include

6
08-02-2022

Extend Relationship Generalization


 The extended relationship is used to indicate that use Generalization is a relationship between a
case completely consists of the behavior of another use general use case and a more specific use case
case at one or specificpoint
 use cases that extend the behavior of other core use that inherits and extends features to it
cases.Enable to factor variants use cases that are specialized versions of other
 The base use case implicitly incorporates the behavior of use cases
another use case at certain points called extension
points It is shown as a solid line with a hollow arrow
 It is shown as a dotted line with an arrow point and point
labeled <<extend>>
<< extend>>
Register
Login
New User

7
08-02-2022

UsesRelationship Include Relationship


 Include relationships insert additional behavior intoa
When a use case uses another process, the base use case
relationship can be shown with the uses  use cases that are included as parts of other usecases.
relationship Enable to factor commonbehavior.
This is shown as a solid line with a hollow arrow  The base use case explicitly incorporates the behavior of
point and the <<uses>>keyword another use case at a location specified in the base.
 They are shown as a dotted line with an open arrowand
the key word <<include>>

8
08-02-2022

Example
Extend vsInclude

place
place <<extend>>
conference
phone call
call
cellular
network receive
receive <<extend>>
additional
phone call
call

use
user scheduler
Cellular Telephone

18

9
08-02-2022

Use CaseDescription Example- Money Withdraw


:Each use case may include all or part of thefollowing Purpose: To withdraw some cash from user’s bank account
 Title or ReferenceName - meaningful name of the UC
 Author/Date - the author and creationdate
 Modification/Date - last modification and its date Overview: The use case starts when the customer inserts his
 Purpose - specifies the goal to beachieved card into the system. The system requests the user PIN. The
 Overview - short description of theprocesses system validates the PIN. If the validation succeeded, the
 Cross References - requirements references customer can choose the withdraw operation else alternative
 Actors - agents participating

1 – validation failure is executed. The customer enters the
Pre Conditions - must be true toallow execution
 Post Conditions - will be set when completesnormally amount of cash to withdraw. The system checks the amount
 Normal flow of events - regular flow of activities of cash in the user account, its credit limit. If the withdraw
 Alternative flow of events - other flow ofactivities amount in the range between the current amount + credit
 Exceptional flow of events - unusual situations limit the system dispense the cash and prints a withdraw
 Implementation issues - foreseen implementation problems
receipt, else alternative 2 – amount exceeded is executed.

10
08-02-2022

Actors: Customer
Typical course of events

• Pre Condition:
– The ATM must be in a state ready to accepttransactions
– The ATM must have at least some cash on hand that it candispense
– The ATM must have enough paper toprint a receipt for at least one
transaction

Post Condition:
– The current amount of cash in the user account is theamount before
the withdraw minus the withdraw amount
– A receipt was printed on the withdraw amount
– The withdraw transaction was audit in the System logfile

11
08-02-2022

One method to identify use cases isactor-based:


• Alternative flow of events: 
- Identify the actors related to a system ororganization.
– Step 3: Customer authorization failed. Display an error - For each actor, identify the processes they initiate or participate in.
message, cancel the transaction and eject the card. • A second method to identify use cases isevent-based:
– Step 8: Customer has insufficient funds in its account. - Identify the external events that a system mustrespond to.
Display an error message, and go to step6. - Relate the events to actors and usecases.
– Step 8: Customer exceeds its legal amount. Display an • The following questions may be used to help identify theuse cases
error message, and go to step6. for asystem:
- What are tasks of each actor ?
• Exceptional flow of events: - Will any actor create, store, change, remove, or read information in the
– Power failure in the process of the transaction before step system ?
- What use cases willcreate, store, change, remove, or read this information ?
9, cancel the transaction and eject thecard - Will any actor need to inform the system about sudden, external changes ?
- Does any actor need tobe informed about certain occurrences in the system ?
- Can all functional requirements be performed by the use cases?

12

You might also like