Large Scale Systems Design
G52LSS
Lecture 13 – Use Case Analysis
•Refine Requirements
•Use Case Diagrams and Use Cases
•Steps of Use Case Analysis
•Example: University Registration System
Learning outcomes: understand the importance of continuously
refine requirements; identify some tools for use case analysis; apply
the steps for use case analysis; demonstrate use case analysis for a
small case.
University of Nottingham Large Scale Systems Design 1
School of Computer Science Dr Dario Landa-Silva
Refine Requirements
To better understand processes and data within the
system and to help refining system requirements the
following can help:
• Summary of business activities
• Use-case analysis: user stories, use case diagrams,
use cases
The requirements specification phase in the SDLC has a
clear purpose:
to define requirements that match the real users’ needs
University of Nottingham Large Scale Systems Design 2
School of Computer Science Dr Dario Landa-Silva
Summary of Business Activities
Short and easy to understand description of all the
business activities that should be incorporated into the
system to be developed.
The key difference between the summary of business
activities and a user story is in their scope.
The summary of business activities describes all
business processes within the system.
A user story refers to an specific business process or
function within the system.
University of Nottingham Large Scale Systems Design 3
School of Computer Science Dr Dario Landa-Silva
Use Case Analysis
Event-driven modelling technique – everything in the
system is a response to some triggering event.
A use case diagram represents a complete functionality,
not part of an overall function.
A use-case shows a single function of the system,
describes how the system reacts to an event that triggers
the system, is a set of activities that produce some
output result.
Simple use-cases may have only one path and complex
use cases may have several possible paths.
The information in a use case is organised in three main
parts: basic information, inputs/outputs, and details.
University of Nottingham Large Scale Systems Design 4
School of Computer Science Dr Dario Landa-Silva
User Stories
Helpful technique from extreme programming (XP) to identify
valuable business user requirements.
Narrates from the users’ perspective, the way in which business
processes are performed.
Short and easy to understand so that developers get an overall
picture that is clear enough to estimate what it takes to complete
the project.
Several user stories may be needed to describe the various processes
in the system to be developed.
User stories help developers to understand what happens between
the users and the system.
Users and developers have different backgrounds and points of
view. Therefore, user stories is a good way of communication
between developers and users.
University of Nottingham Large Scale Systems Design 5
School of Computer Science Dr Dario Landa-Silva
Reading good stories is easy but writing them is not
straightforward.
Purpose and Characteristics of Good User Stories
User Developer
(how the system (which units of code
should work) should be developed)
• Common language • Interactions between roles
• Simple sentences and system
• Starting even and ending • Notions are transformable
• Notions from known to code and constructs
vocabulary • Changes in story are easy
to trace in the code
University of Nottingham Large Scale Systems Design 6
School of Computer Science Dr Dario Landa-Silva
Good user stories can follow the SVO (subject-verb-
object) format plus some explanation of the terms used
in the story.
For example:
• Student enters the ID
• Systemverifies the ID is valid (where ID is a 7-digit
number starting with 4 and unique for each student)
• System shows list of available modules
• Student selects modules to register
• System validates that chosen modules are allowed
University of Nottingham Large Scale Systems Design 7
School of Computer Science Dr Dario Landa-Silva
The development cycle of user stories
1. Users write initial stories
2. Users meet with developers and together write
clarified user stories with notions
3. Developers translate the clarified stories into code.
Stories are further clarified with users when required.
Test stories are also written
4. Developers make sure that the test stories are fulfilled
and hand system to users
5. Users verify system and possibly write corrected
stories and new stories
University of Nottingham Large Scale Systems Design 8
School of Computer Science Dr Dario Landa-Silva
Use Case Diagrams and Use Cases
The use case diagram shows the system’s behavior
together with the key actors for a specific scenario.
The elements of use case diagrams are:
• Actors
• Use cases
• System boundary
• Connections
• Extend relationships
• Include relationships
University of Nottingham Large Scale Systems Design 9
School of Computer Science Dr Dario Landa-Silva
Example 13.1 The following is the use case diagram for
an appointments system in a surgery.
receptionist
make,cancel, change
appointment
patient
bill patient
initialise
medical record
extends update medical
record doctor
shows medical
record
University of Nottingham Large Scale Systems Design 10
School of Computer Science Dr Dario Landa-Silva
A use case shows the behavior of a specific functionality
of the system and consists of a set of possible sequences
of interactions between the user and the system.
Basic information
• Name, number and brief description
• Trigger – event that causes the use case to being
External trigger – some from outside the system
Temporal triggers – time-based occurrences
• Viewpoint in a use case should be consistent (from same actor)
Major inputs and outputs
•Sources and destinations
•Goal is to be all inclusive
Further Details
•Steps performed and the data inputs and outputs
University of Nottingham Large Scale Systems Design 11
School of Computer Science Dr Dario Landa-Silva
Example 13.2 The following is one use case for the
appointments system in a surgery in which the main actor is
the patient.
University of Nottingham Large Scale Systems Design 12
School of Computer Science Dr Dario Landa-Silva
Steps of Use Case Analysis
Following the creation of a use case diagram, then cycle
through the steps below in an iterative manner.
1. Identify the major use cases
• Use one use case form for each use case
• If more than nine, group into packages
• Ask who, what, and where about the tasks and their
inputs and outputs
University of Nottingham Large Scale Systems Design 13
School of Computer Science Dr Dario Landa-Silva
2. Identify the major steps within each use case
• For each use case, fill in the major steps needed to
process the inputs and produce the outputs
• Ask how about each use case
University of Nottingham Large Scale Systems Design 14
School of Computer Science Dr Dario Landa-Silva
3. Identify elements within steps
• For each step, identify its triggers, its inputs and
outputs
• Ask how about each step
4. Confirm the use case.
• For each use case, validate that it is correct and
complete
• Ask the user to execute the process using the written
steps in the use case, that is, have the user role-play
the use case
University of Nottingham Large Scale Systems Design 15
School of Computer Science Dr Dario Landa-Silva
Example: University Registration System
Exercise D, (Dennis et al. 2006, chapter 5). A University
Registration System should enable staff of each academic
department to examine the modules offered by their department,
add and remove modules, and change the information about them
(e.g. the maximum number of students permitted).
It should permit students to examine currently available modules,
add and drop modules to and from their schedules, and examine
the modules for which they are enrolled. Department staff should
be able to print a variety of reports about the modules and the
students enrolled in them. The system should ensure that no
student takes too many modules and that students who have any
unpaid fees are not permitted to register (Note: assume that a
fees data store is maintained by the university’s financial office
and this data store is accessed by the registration system but the
fees data store is not modified by the registration system).
University of Nottingham Large Scale Systems Design 16
School of Computer Science Dr Dario Landa-Silva
Use Case Diagram
student
shows moduleinfo shows module
andenrolment info
department staff
verifymodule
enrolmentis permitted enrol in
module
extends financial office
(fees data)
includes
maintains verify student
module info financialstatus
University of Nottingham Large Scale Systems Design 17
School of Computer Science Dr Dario Landa-Silva
Step 1. Identify Major Use Cases:
• Maintain information about available modules
• Enrol student in module
• Produce reports about modules and student
enrolments
For each use case identify the basic information, inputs
and outputs
Step 2. Identify the major steps within the use case
Step 3. Identify elements within the steps
Step 4. Confirm each use case with the user
University of Nottingham Large Scale Systems Design 18
School of Computer Science Dr Dario Landa-Silva
Use Case Name: Enrol student in module ID Number: 2
Short Description: Describes how students review listing of modules available for enrolment,
add and remove modules from their schedules, and review their schedules.
Trigger: Student requests to enrol in modules.
Type: External / Temporal
Major Inputs: Major Outputs:
Description Source Description Destination
Available module request______ Student____________ List of available modules Student_____
Available modules____________ Module offerings file__ Student enrolment_ Enrolment file
Module enrolment request______ Student_____________ Student schedule __ Student_____
Fee payment status____________ Fees file____________ ________________ ___________
___________________________ ___________________ ________________ ___________
___________________________ ___________________ ________________ ___________
Major Steps Performed Information for Steps
1. Student requests list of available modules. List of available Available module request
modules is generated. Available module list
2. Student adds module to current schedule. Fee payment status is Module ID
checked and total hours is checked. If OK, module is added to Enrolment file
student schedule. Fees file
Module offerings file
3. Student removes module from schedule. Module ID
Enrolment file
Module offerings file
4. Student reviews current scheduled modules. Enrolment file
University of Nottingham Large Scale Systems Design 19
School of Computer Science Dr Dario Landa-Silva
Use Case Name: Maintain information about available modules ID Number: 1
Short Description: Describes how department staff reviews module offerings, adds new
modules, deletes existing modules or changes existing module information.
Trigger: Departments must prepare upcoming module offerings.
Type: External / Temporal
Major Inputs: Major Outputs:
Description Source Description Destination
Module offering changes______ Department staff______ Updates module offerings Module offerings file
Module offerings_____________ Module offering file____ Module offerings list____ Department staff
Major Steps Performed Information for Steps
1. Department staff requests module offering list for the Module offering list request
department. Department identifier
2. New module information is entered. New module information
Module offering file
3. Modules to delete are entered. Module number to delete
Module offering file
Module number to modify
4. Module modifications are entered. Module changes
Module offering file
University of Nottingham Large Scale Systems Design 20
School of Computer Science Dr Dario Landa-Silva
Use Case Name: Module enrolment reports ID Number: 3
Short Description: Describes how department staff prints various reports on modules and
enrolments.
Trigger: Department staff needs information on modules and module enrolments.
Type: External / Temporal
Major Inputs: Major Outputs:
Description Source Description Destination
Report request_______________ Staff_______________ Report requested__ Staff________
Module information___________ Module offerings_____ ________________ ___________
Enrolment information_________ Module information___ ________________ ___________
Major Steps Performed Information for Steps
1. Staff enters report request. Report type
2. Requested report is generated. Module offerings
Enrolments
University of Nottingham Large Scale Systems Design 21
School of Computer Science Dr Dario Landa-Silva
A simple user story for the case in which a student
enrols in a module:
Student access the system. If the student has a valid
username and password, allow the student to sign-in,
otherwise display an explanatory message.
Student requests list of available modules. Search the fees file
to determine whether the student is permitted to register or
not.
System shows list of available modules. Displays a list of
available modules according to the fee paying status of the
student.
Student request enrolment in selected module. Check if the
enrolment is permitted according to the number of modules in
which the student is already registered.
University of Nottingham Large Scale Systems Design 22
School of Computer Science Dr Dario Landa-Silva
System confirms enrolment. Ask the student to confirm the
enrolment. Display confirmation of enrolment and update the
enrolment file. Provide the student with a confirmation code
for the enrolment.
Student requests dropping a module. Display updated
information and ask the student to confirm the drop. Update
the enrolment file. Provide the student with a confirmation
code.
Student continues with more enrolments and drops. If the
number of modules in which the student is enrolled has not
reached the maximum permitted, give the student the option
to enrol in other modules. If there are at least one module in
which the student is enrolled, give the student the option to
drop modules.
System shows current student’s schedule. Display student’s
schedule for modules enrolment. Give student the options of
printing, saving and emailing the current schedule.
University of Nottingham Large Scale Systems Design 23
School of Computer Science Dr Dario Landa-Silva
A summary of business activities for the University
Registration System:
Staff and students access the system providing a valid
username and password.
Staff access information for the available modules in their
department.
Staff adds, removes, and change information about the
modules for which they are responsible.
For each academic department, authorised staff modifies the
maximum number of modules that students are permitted to
take.
Staff prints reports of various kinds about the available
modules and their detailed information and reports about
student enrolment.
University of Nottingham Large Scale Systems Design 24
School of Computer Science Dr Dario Landa-Silva
Students are permitted to access the list of available modules
if they do not have unpaid fees.
Students make request for enrolment in a module of their
choice. If the student has not reached the maximum number
of modules permitted then the enrolment is processed.
Students are notified of the enrolment.
Students make request for dropping a module of their choice.
Students are notified of the change in their enrolment record.
Students can access their schedule and they can print, email
or save it in a file.
University of Nottingham Large Scale Systems Design 25
School of Computer Science Dr Dario Landa-Silva
Additional Reading
Chapter 5 of (Dennis et al., 2006)
Chapter 7 of (Hoffer et al., 2005) pages 225-233.
University of Nottingham Large Scale Systems Design 26
School of Computer Science Dr Dario Landa-Silva