You are on page 1of 9

1.

Introductions to use cases


2. Decoding the use case diagram
3. Driving deep into use case diagram notations
4. Use case diagram relationships
5. Additional topics you can not ignore
6. Producing use cases

1. Introductions to use cases:-


UML diagram is of 2 types:-
1. Structure Diagram
2. Behaviour Diagram:-
Use case diagram
Q1.What is use case??
Ans:- Use cases capture how the system will be used or utilized by its
end users.
E.g:- Mark attendance-Use case for attendance system
Search Flights-use case for Flight Booking System

You can imagine that it is a “Case of Use” of the system.


E. g:- Online Banking use cases-
Transfer Funds,Pay Bills,Request Cheque Book,view balance,block
card,enable card

Definition:-Use case captures what system or subsystem will do e.g. for


online Ticket Booking portal:-Issue Ticket,Cancel Ticket,Issue Return
Ticket etc.
As a Ba when you start your project/elicit requirements start preparing
use cases.
Use cases can be very detailed.

Q2.Use cases-Preparation& Utilization??


Ans:- Who prepares use cases- IT Business Analyst
Who utilizes use cases-Clients,Architects,Developers,Testers,Process
Owners

Q3.History of Use cases?


Ans:- Pioneered by Dr.Evar Jacobson while at Ericsson
Dr.Evar joined the UML partners Booch & Rumbaugh in 1955
Thus UML came into existence
Q4.How a BA utilizes use case diagram?
Ans:- New- Captures overall requirements through use case model.
Identify in scope & out of scope.
Incorporate it in requirement documents
Must use technique for starting projects.

Existing- Explore existing functionality


Train others
Plan new functionality

Q5.Understand top level requirements??


Ans: Think of yourself as an IT Business Analyst on the project for online
Railway Ticket Reservation.
You discuss top level or overall requirements with the clients at the
start of the project.
Client tells you that the system will allow registered persons on the
portal book tickets,cancel tickets,view ticket availability but not
reschedule tickets.

2.Decoding the use case diagram:-

Employee-->Mark attendance--->Director Apply Leave


Administrator-->View Reports--->Director
Block Employee

Use Cases Notation & Terminology:-


Like all other UML diagrams,use case have standard notation &
terminology.
Our world is easy,quick & precise when we use standard notations &
standard terms.

3. Driving deep into use case diagram notations


Actor:- Notation of Actor is Stickman
Below the Actor-Actor Role(Not Title) is mentioned
Actors are human or non-human entities which interact with the system.
Actors can be other software or hardware as well.
Interaction of Actors with the system is captured by Use cases.
Primary Actors initiate the use case.
Secondary Actors do not initiate the use case.

Q1.How to identify Actors in a system?


Ans:-Who uses the system.
What other software interact with the system.
Who does the installation,start up,shutdown,backup,maintenance etc.
From where does our software receive data & from whom.
Where does our software send data to.
What inputs are received by the system.

Q2.Primary & Secondary Actors?


Ans:- Primary Actors-
Primary Actors initiate Use cases.
Secondary Actors-
Secondary Actors not initiate Use cases.

Q3.Use case?
Ans:- Notation of use case is Ellipse.
Use cases depict pattern of Behaviour of system.
System response under various Actor Stimuli is the use case name.
Use case name is a verb.
Use case inside system boundary are in-scope functionality of the
system.
Use case outside system boundary is out of scope functionality.

Q4.How to identify use case in a system?


Ans: What goals primary actors want to achieve with this system.
Why does software interact with secondary actors.
What are the primary goals of this software.

Q5.Instance of Use case?


Ans: Numerous account holders,more than one administrator can
withdraw cash from ATM,each of them is using a different instance of
use case “Withdraw cash”

Q6.Scenario of a use case?


Ans: Different instance of use case can take different scenario e.g:-
Cash withdrawn successfully.
Cash withdrawal denied due to inadequate balance.
ATM is out of cash.
Adequate cash in ATM,adequate balance maintained by account holder
but currency denomination asked for is not available.

Q7.How to capture use case scenarios?


Ans:- Use case scenarios are not captured in use case diagrams.
You can discuss them in associated documentation of use case.
Use case scenarios are captured in Activity Diagrams.

Q8.System Boundary?
Ans:- System or subsystem for which use case diagram is prepared is
called subject.
Notation of system boundary is rectangle.
Actors are shown outside system boundary.
In scope use cases are shown inside.
System Boundary.
Out of scope use case are shown outside system boundary.
Actor use case relationship notation associate use case with Actor.

4. Use Case Diagram Relationships

There are five relationships in a use case diagram:-


1. Association between Actor & a use case
2. Generalization between Actors
3. Generalization between Use Cases
4. Include Relationship between Use Cases
5. Extend Relationship between Use Cases

1.Association between Actor & a use case:-


One Actor can be associated with one or more use cases & vice versa.

2. Generalization between Actors:-


There are 2 Actors- Generalized Actor & Specialized Actor
Notation for Generalization relation ship between actors (upper row)

Generalized Actors-
Are associated with one or more use cases
Specialized Actors-
Are related with generalized actors.They are associated with all the use
cases of the generalized actor and one or more additional use cases.

3.Generalization between Use cases-


At times one use case can be carried out in more than one ways.
Lets say the Administrator deactivates the card in light of some
suspicious activity/report in two ways.
1. On Report of card theft/on finding suspicious activity deactivate
individual cash card.
2. Check weekly report of unusual card usage and block card through
batch program.

Use Case Generalization relationship notation-

Specialized use case name-->More general use case name

Deactivate card-->
1.Deactivate card one by one
2.Deactivate card through batch program weekly

Abstract & Real/Concrete Use cases-


This vocabulary is not part of UML Document from OMG.

Notation for Include Relationship between use cases:-


<<includes>>
Including use case name------------------->Include use case name

Arrow initiates from including use case & points towards included use
case.For example if after a particular transaction SMS is invariably send
then Transaction (including use case) includes Send SMS which is
(included use case)

Include relationship
ATM Subsystem-
A/C --> withdraw cash-->send sms-->SMS software
Holder --> check a/c balance
In here,
Withdraw cash-->including use case
Send sms--> included use case( compulsory carried out)

Extended Relationship Between Use case:-


Some times one use case may optionally extend its functionality to
another use case.
<<extends>>
Extended use case name <---------- Extending use case name

Arrow initiates from Extending use case to Extended use case

Fig:-Notation for Extend Relationship between use cases

Example of Extend relationship:-

Lets think of a Estate Selling & broking system where


1. Customer visits the Estate selling & broking office & asks the Estate
Agent to Recommend Flats for him to purchase depending on his need
2. The Estate Agent asks the mobile no. of the customer & confirms his
record in the database.If the record is not present he quickly captures
the record by writing down name,mobile no & email id.
3. The Estate Agent searches his database to recommend available flat
to purchase
4. Optionally the (Estate Agent) can book a specific flat for the customer
if he so desired.

Extend relationship:-
<<includes>>
Estate Agent-----Recommend ---------->Search apartment
Apartment ---------->Reserve apartment
<<extends>>

Additional topics:-

1. Use of comments in a use case diagram:-


A flipped rectangle is notation for comment.It is used for any comment
or explanation.The comment or explanation is written inside the
box.This comment is connected with the object whose explanation is
being provided through an association notation.

2. Notation for conditions and utilizing OCL:-


A flipped rectangle is notation for condition.Any condition is written
within curly brackets.This is different than a comment which is written
inside without a curly bracket.While writing conditions you can utilize
OCL or Object Constraint Language.

Use Case Documentation:-


Method 1:- Write in a paragraph sequence of activities happening in a
use case diagram.
Method 2:-For every actor prepare a table which will have two
columns,column on the left will have actor stimuli & column on the right
will mention system response.
Method 3:-Any other procedure or standard document template used in
you organization.

E.g:-
M1:-Use case documentation(Paragraph Style)
The proposed ATM subsystem will allow the account holder to withdraw
cash & conduct other branch banking activities allowing him 24*7
convenience.It will also reduce work load on the bank branch personnel.
The following will be Actors of the system
Account holder:- Account holder will be able to withdraw cash,check
account balance,Print mini statement
Administrator:-The ATM subsystem can have more than one
administrators.As they are bank employees they will also hold accounts
In the bank.Hence,the administrator has all the of the account holder,He
will additional use cases such as “view reports ” for ATM subsystem &
can block “Card” of the Account holder if he thinks there is some
activity.
SMS software;-When ever cash is withdrawn a SMS is send to the
Account holder it is done through a third party software.So,it is a non
human or system Actor to ATM subsystem.
The use cases which will be the functionality of the ATM subsystem will
be:-Withdraw cash,Check account balance,Print Mini statement,view
reports,block card.You can see cheque payment will not be functionality
Of the ATM subsystem.
M2:-Use Case Documentation(Tabular Style):-

Actor-Account Holder ATM Subsystem


Will provide the Transaction Type Will ask the Account Holder to
As withdrawal. Choose from std,express/custo
m options.
Will choose the withdrawal Will ask for confirmation.
Cash option.
Will confirm the option. Will provide relevant screen.
Will choose/provide the Will check rules,account
Withdrawal amount. Balance,cash present & ATM
Dispense cash
Will collect cash Will invoke use case ”send sms”
Will receive SMS notification
for cash withdrawal

Use case requires 3 skills:-


1. Use case modelling skills.
2. Domain or process knowledge
3. Proficiency in the modelling tool

Step by step method to produce use cases:-


1. Identify Actors
2. Identify Use Cases
3. Identify Relationships
4. Start Modelling
5. Start Documentation
6. Share the Use Case Model
7. Revise if required

You might also like