Assignment 3 Modeling Uml Use Case Diagrams and Capturing Use Case Scenarios
Assignment 3 Modeling Uml Use Case Diagrams and Capturing Use Case Scenarios
Introduction
Use case diagram is a platform that can provide a common understanding for the end-users,
developers and the domain experts. It is used to capture the basic functionality i.e. use cases,
and the users of those available functionality, i.e. actors, from a given problem statement.
In this experiment, we will learn how use cases and actors can be captured and how different
use cases are related in a system.
Objectives
After completing this experiment you will be able to:
How to identify different actors and use cases from a given problem statement
How to associate use cases with different types of relationships
How to draw a use-case diagram
Time Required
Around 3.00 hours
Case Study
Figure 1: Use case diagram showing "New user registration" use case
The above figure also depicts extension of a use case. "Answer security question" is not a use
case by itself, and is not invoked in a "normal" flow. However, when a member is trying to
login, and provides incorrect (<user_id>, <password>) for three consecutive times, he is
asked the security question that was set during registration. If user can answer the question
correctly, the password is send to his email address. However, if the user fails to answer the
security question correctly, his account is temporarily blocked. Details of the concerned use
case extension is shown in table 5.
Table 5: Extension for use case New user registration
Use Case
Answer security question extends UC2. User login
Extension
Deals with the condition when a user has three
Description
consecutive login failures, and he attempts to login again
3a. IF consecutive failure count is 3 THEN invoke
Steps
"Answer security question"
The details of the "Issue book" use case is shown in table 6.
Table 6: UC5 -- Issue book
Use Case UC5. Issue book
Description Allows a member to issue a specified book against his account
1. User is logged in
Assumption 2. The book is available
s 3. User's account has not exceeded the limit of maximum books
that can be issued
Member (primary)
Actors
Library staff
1. User logs in
2. User searches for a book
Steps 3. User clicks on "Issue" button to issue the book
4. User's account is updated
5. Library staff delivers the book
Variations
Non-
functional
Issues
In order to issue a book, the availability of the book has to be checked. Also, the system
needs to verify whether another book could be issued to the current user. These are shown in
figure 2 by the «include» relationship among the use cases. The maximum # of books that
can be issued to a user depends on whether he is a student or a professor. So, "Verify issue
count" is a general use case, which has been specialized by "Verify student issue count" and
"Verify professor issue count" use cases. These have been represented by the "generalization"
relationship in figure 2.
Figure 2: Use case diagram showing "Issue book" use case
In the above scenario "Member" is the primary actor who triggers the "Issue book" use case.
"Library staff" is a secondary actor here.
1. What does a use case diagram represent?
A set of actions Time sequence of statements executed
How to use a particular module Dont know
2. In a use case diagram, relationships between different actors are normally shown
True False
3. Generalization relationship exists between two use cases when
A use case derives from a base use case
A use case derives from a base use case and specializes some of its inherited
functionality
A use case includes functionality of another use case
No two use cases can be related
4. A college has an online Library Management System. Who's the primary actor here?
Librarian Director of the college
Teacher Student
5. Use cases can be used for testing, which includes
Validation Verification
Both None
Following books and websites have been consulted for this experiment.
You are suggested to go through them for further details.
Bibliography
1. Object-Oriented Modeling and Design with UML, Michael Blaha, James Rumbaugh,
Prentice-Hall of India, 2nd Edition
2. Object-Oriented Analysis and Design using UML, Mahesh P. Matha, Prentice-Hall of
India,
Webliography
i. Use Case Diagrams
ii. Use case diagram -- Wikipedia
iii. Unified Modeling Language, Superstructure, V2.1.2
iv. "Functional Requirements and Use Cases", Ruth Malan and Dana Bredemeyer,
Bredemeyer Consulting
v. "A Use Case Template: draft for discussion", Derek Coleman, Hewlett-Packard
Software Initiative
vi. X. J. Zheng, X. Liu, & S. Liu. (2010). Use Case and Non-functional Scenario Template-
Based Approach to Identify Aspects. Computer Engineering and Applications ICCEA
2010 Second International Conference on (Vol. 2, pp. 89-93)
vii. Extend relationships
viii. Requirements Trace-ability and Use Cases
ix. UML Use Case Diagrams: Tips and FAQ