5-Ch03
5-Ch03
Orientated Development
Print
invoice
We start each use case label with a verb making the point
that the use case represents a major piece of functionality in
the system e.g. Maintain customer, Create order, Print
invoice.
Identifying use cases
A use case describes a cohesive piece of the system’s
functionality as the user perceives it.
A use case should represent a complete process; one end
to end pass through the system, a job that the user sits
down at the computer to achieve at one go.
What we do when identifying use cases is to divide up the
system’s functionality into chunks; the main areas of
functionality. But what dictates the split is what the user
sees as the separate jobs or processes that he will use the
system to achieve.
The user may see a chunk of functionality as a task that he
uses the system to achieve, one of the jobs that make up
his daily workload, or it may produce a list or report he gets
from the system.
Each use case must have a goal – something it achieves for
the user.
An Actor
Receptionist
Login
Student
Register for Courses Maintain Student Information
Professor
Submit Grades
Use Case Diagrams (Watch)
Package
SimpleWatch
Actor
ReadTime
SetTime
WatchUser WatchRepairPerson
Is s ue bike
Receptionis t
Issue bike
Receptionist
Wheels use case diagram
Use Case Modeling: Core Elements
Construct Description Syntax
use case A sequence of actions, including
variants, that a system (or other UseC aseNam e
Place Order
Request
Catalog
<<include>>
Order Check
goods customer
credit
<<extend>>
Chase Issue
payment warning
letter
2: validate id
Description:
When a customer comes into the shop they choose a bike to
hire. The Receptionist looks up the bike on the system and tells
the customer how much it will cost to hire for a specified
period. The customer pays, is issued with a receipt, then leaves
with the bike.
Expanded Use Case Description
More detailed and structured than the high
level description and should document:
– what happens to initiate the use case
– which actors are involved
– what data has to be input
– the use case output
– what stored data is needed by the use case
– what happens to signal the completion of
the use case
– minor variations in the sequences of events.
Use case : Issue bike
Preconditions: ‘Maintain bike list’ must be executed.
Actors: Receptionist
Goal: To hire out a bike
Overview:
When a customer comes into the shop they choose a bike to hire. The receptionist looks
up the bike on the system and tells the customer how much it will cost to hire the bike for a
specified period. The customer pays, is issued with a receipt, then leaves with the bike.
Cross reference R3, R4, R5, R6,R7, R8, R9, R10
Typical course of events
Actor action System response
Alternative courses
Steps 8 and 9. The customer details are already in the system so the Receptionist needs
only to key in an identifier and the system will display the customer details.
Steps 7 – 12. The customer may not be happy with the price and may terminate the
transaction.
Actor descriptions
This figure illustrates that a Bank Teller and a Bank Manager are
both Bank Employees
Further Reading
Bennett, S., McRobb, S. and Farmer, R. Object-Oriented
Systems Analysis and Design Using UML, 2nd Ed, London:
McGraw-Hill, 2002.
Brown, D. Object-Oriented Analysis: objects in plain English,
New York: John Wiley, 1997.
Fowler, M. UML Distilled: a brief guide to the standard object
modeling language, 2nd Ed, Reading Massachusetts: Addison-
Wesley, 2000.
Larman, C. Applying UML and patterns: an introduction to
object-oriented analysis and design, New Jersey: Prentice
Hall, 1998.
Lunn, K. Software Development with UML, Hampshire:
Palgrave Macmillan, 2003
Stevens, P., with Pooley, R. Using UML. Software Engineering
with Objects and Components Updated edition, Harlow:
Addison-Wesley, 2000.