Beruflich Dokumente
Kultur Dokumente
UML in Action
2
May-June 2001 ISISTAN Research Institute – Tandil, L12-S2 Use Case Modeling
Argentina -- M.E. Fayad
Lesson Objectives
3
May-June 2001 ISISTAN Research Institute – Tandil, L12-S3 Use Case Modeling
Argentina -- M.E. Fayad
What is use case modeling?
4
May-June 2001 ISISTAN Research Institute – Tandil, L12-S4 Use Case Modeling
Argentina -- M.E. Fayad
Use Case Modeling: Core Elements
Construct Description Syntax
use case A sequence of actions, including
variants, that a system (or other
entity) can perform, interacting with U seC aseN am e
7
May-June 2001 ISISTAN Research Institute – Tandil, L12-S7 Use Case Modeling
Argentina -- M.E. Fayad
Use Case Diagram Tour
8
May-June 2001 ISISTAN Research Institute – Tandil, L12-S8 Use Case Modeling
Argentina -- M.E. Fayad
Use Case Diagram
Telephone Catalog
Check
status
Place Salesperson
order
F ill o r d e r s
Customer Shipping Clerk
Establish
credit
9
Supervisor
Fig. 3-44, UML Notation Guide
May-June 2001 ISISTAN Research Institute – Tandil, L12-S9 Use Case Modeling
Argentina -- M.E. Fayad
Use Case Relationships
Supply Order
Customer Data Product Arrange
Payment
Place Order
Request
Catalog
1 * Place
Order
Salesperson
Establish
1 *
Supervisor
Credit
11
Fig. 3-46, UML Notation Guide
May-June 2001 ISISTAN Research Institute – Tandil, L12-S11 Use Case Modeling
Argentina -- M.E. Fayad
Use Case Description: Change Flight
Actors: traveler, client account db, airline reservation system
Preconditions:
…
12
System displays transaction summary.
Alternative courses
May-June 2001 ISISTAN Research Institute – Tandil, L12-S12 Use Case Modeling
Argentina -- M.E. Fayad
When to model use cases
13
May-June 2001 ISISTAN Research Institute – Tandil, L12-S13 Use Case Modeling
Argentina -- M.E. Fayad
Use Case Modeling Tips
Make sure that each use case describes a significant chunk of
system usage that is understandable by both domain experts and
programmers
When defining use cases in text, use nouns and verbs accurately
and consistently to help derive objects and messages for
interaction diagrams
Factor out common usages that are required by multiple use cases
– If the usage is required use <<include>>
– If the base use case is complete and the usage may be optional,
consider use <<extend>>
A use case diagram should
– contain only use cases at the same level of abstraction
– include only actors who are required
Large numbers of use cases should be organized into packages
May-June 2001 ISISTAN Research Institute – Tandil, L12-S14 Use Case Modeling
Argentina -- M.E. Fayad
Sample Problem Statement: Library System
15
*Example from: “Using UML”, by: Pooley and Stevens
May-June 2001 ISISTAN Research Institute – Tandil, L12-S15 Use Case Modeling
Argentina -- M.E. Fayad
First Step!
17
May-June 2001 ISISTAN Research Institute – Tandil, L12-S17 Use Case Modeling
Argentina -- M.E. Fayad
The Use Case Template
18
May-June 2001 ISISTAN Research Institute – Tandil, L12-S18 Use Case Modeling
Argentina -- M.E. Fayad
Documenting Use Cases
19
Copyright © 1997 by Rational Software Corporation
May-June 2001 ISISTAN Research Institute – Tandil, L12-S19 Use Case Modeling
Argentina -- M.E. Fayad
Actors
An actor is someone or something that must interact with the
system under development
BookBorrower
Browser
Librarian
JournalBorrower
May-June 2001 ISISTAN Research Institute – Tandil, L12-S20 Use Case Modeling
Argentina -- M.E. Fayad
Use Cases
Actors are examined to determine their needs
– BookBorrower
• Checkout and return books
– Browser
• locate and peruse items of interest
– Librarian
• maintain order and accountablility
– JournalBorrower
• checkout and return journals
May-June 2001 ISISTAN Research Institute – Tandil, L12-S21 Use Case Modeling
Argentina -- M.E. Fayad
Use Case Model
The usual course through the system when actor is using the
system is called the basic course. Other courses would be
modeled as extending Use Cases.
An example of a basic course would be:
– Borrow copy of book A BookBorrower presents a book. The
system checks that the potential borrower is a member of the
library, and that s/he does not already have the maximum
permitted number of books on loan. This maximum is six unless
the member is a staff member, in which case it is 12. If both
checks succeed, the system records that this library member has
this copy of the book on loan.
**Example from: “Using UML”, by: Pooley and Stevens
22
May-June 2001 ISISTAN Research Institute – Tandil, L12-S22 Use Case Modeling
Argentina -- M.E. Fayad
Use Case Diagram for the first iteration
23
*Example from: “Using UML”, by: Pooley and Stevens
May-June 2001 ISISTAN Research Institute – Tandil, L12-S23 Use Case Modeling
Argentina -- M.E. Fayad
What Requirements would an ideal system satisfy?
May-June 2001 ISISTAN Research Institute – Tandil, L12-S24 Use Case Modeling
Argentina -- M.E. Fayad
What Requirements would an ideal system satisfy?
26
*Example from: “Using UML”, by: Pooley and Stevens
May-June 2001 ISISTAN Research Institute – Tandil, L12-S26 Use Case Modeling
Argentina -- M.E. Fayad
Example II: University Registration
May-June 2001 ISISTAN Research Institute – Tandil, L12-S27 Use Case Modeling
Argentina -- M.E. Fayad
Actors
Registrar
Professor
Student
Billing System
28
Copyright © 1997 by Rational Software Corporation
May-June 2001 ISISTAN Research Institute – Tandil, L12-S28 Use Case Modeling
Argentina -- M.E. Fayad
Use Cases
Actors are examined to determine their needs
– Registrar
• maintain the curriculum
– Professor
• request roster
– Student
• maintain schedule
– Billing System
• receive billing information from registration
Student Professor
Maintain Schedule
Registrar
<<uses>>
Register for courses
<<uses>>
Logon validation
Maintain curriculum
33
May-June 2001 ISISTAN Research Institute – Tandil, L12-S33 Use Case Modeling
Argentina -- M.E. Fayad
Cautions
34
May-June 2001 ISISTAN Research Institute – Tandil, L12-S34 Use Case Modeling
Argentina -- M.E. Fayad
Acknowledgements
May-June 2001 ISISTAN Research Institute – Tandil, L12-S35 Use Case Modeling
Argentina -- M.E. Fayad
Sample Use Case from Philips Project (1)
36
May-June 2001 ISISTAN Research Institute – Tandil, L12-S36 Use Case Modeling
Argentina -- M.E. Fayad
Sample Use Case from Philips Project (2)
37
May-June 2001 ISISTAN Research Institute – Tandil, L12-S37 Use Case Modeling
Argentina -- M.E. Fayad
Sample Use Case from Philips Project (3)
38
May-June 2001 ISISTAN Research Institute – Tandil, L12-S38 Use Case Modeling
Argentina -- M.E. Fayad
Sample Use Case from Philips Project (4)
Description of the Use Case:
1. The Registrar enters the information about a person into the IDSession.
2. The IDSession has security clear the request.
3. The IDSession has the PersonIdentifier search for candidates.
4. The Person-Identifier determines that no candidates fit the criteria.
5. The Person-Identifier gives this information to the system.
6. The informs the Registrar that no candidates exist.
7. System asks the Registrar if the person should be added as new.
8. Registrar tells System to add new person.
9. System sends traits to ID-Manager.
10. ID-Manager creates a new profile.
39
May-June 2001 ISISTAN Research Institute – Tandil, L12-S39 Use Case Modeling
Argentina -- M.E. Fayad
Sample Use Case from Philips Project (5)
40
May-June 2001 ISISTAN Research Institute – Tandil, L12-S40 Use Case Modeling
Argentina -- M.E. Fayad
Sample Use Case from Philips Project (6)
41
May-June 2001 ISISTAN Research Institute – Tandil, L12-S41 Use Case Modeling
Argentina -- M.E. Fayad
Sample Use Case from Philips Project (7)
42
May-June 2001 ISISTAN Research Institute – Tandil, L12-S42 Use Case Modeling
Argentina -- M.E. Fayad
Bibliography and Suggested Reading
“Object-Oriented Software Engineering: A use Case Driven Approach”, by Ivar
Jacobsen
“Use Case Modeling: Capturing User Requirements” by Edward Kenworthy (
http://www.zoo.co.uk/~z0001039/PracGuides/pg_use_cases.htm)
“Structuring Use Cases With Goals” by Alistair Cockburn
(http://members.aol.com/acockburn/papers/usecases.htm)
“Use Cases Fundamentals” by Alistair Cockburn
(http://members.aol.com/acockburn/papers/AltIntro.htm)
“OOSC2: The Use Case Principle” by Bertrand Meyer (
http://www.elj.com/elj/v1/n2/bm/use-cases/ )
“The Roles of Use Cases in Analysis” by Daniel A. Rawsthorne, PhD
(http://www.pols.co.uk/usecasezone/UseCaseConcepts.html )
“The Misuse of Use Cases” By Dr. Timothy Korson
(http://www.software-architects.com/publications/korson/Korson9803om.htm )
“Constructing Useful Use Cases” By Dr. Timothy Korson
(http://www.korson-mcgregor.com/publications/korson/usecase3/index.html )
May-June 2001 ISISTAN Research Institute – Tandil, L12-S43 Use Case Modeling
Argentina -- M.E. Fayad
Discussion Questions
• What are the use case modeling good, bad, and ugly?
• Define: Actor, role, and use case
• What are the differences between use cases and
scenarios?
• What are the differences between use case and a
process?
44
May-June 2001 ISISTAN Research Institute – Tandil, L12-S44 Use Case Modeling
Argentina -- M.E. Fayad
Questions for the Next Lecture
Define:
– Enduring themes
– Business Objects
– Industrial Objects
Discuss the ways to analyze a problem.
What is a problem?
What are the elements of problem
analysis?
45
May-June 2001 ISISTAN Research Institute – Tandil, L12-S45 Use Case Modeling
Argentina -- M.E. Fayad