cmpe135-ooad-l09n

46
Fall 2002 SJS U -- CmpE Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Comput er Engine ering De partment ± RM# College of Engineering San José State University One Washington Square San José, CA 95192-0180 URL: http://www.cmpe.sjsu.edu/~fay ad

Upload: kartikn91

Post on 09-Apr-2018

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CmpE135-OOAD-L09n

8/8/2019 CmpE135-OOAD-L09n

http://slidepdf.com/reader/full/cmpe135-ooad-l09n 1/46

Fall 2002 SJSU -- CmpE

Object-Oriented Analysis & Design

Dr. M.E. Fayad, Professor

Computer Engineering Department ± RM#

College of Engineering

San José State University

One Washington Square

San José, CA 95192-0180

URL: http://www.cmpe.sjsu.edu/~fayad

Page 2: CmpE135-OOAD-L09n

8/8/2019 CmpE135-OOAD-L09n

http://slidepdf.com/reader/full/cmpe135-ooad-l09n 2/46

L09-S2 Use Case ModelingFall 2002 SJSU ± CmpE M.E. Fayad

2

Lesson 12:Use Case Modeling

Page 3: CmpE135-OOAD-L09n

8/8/2019 CmpE135-OOAD-L09n

http://slidepdf.com/reader/full/cmpe135-ooad-l09n 3/46

L09-S3 Use Case ModelingFall 2002 SJSU ± CmpE M.E. Fayad

Lesson Objectives

Objectives

3

Overview of Previous Lecture 

Discuss the following: 

 ± What is use case modeling?

 ± Use Case Modeling -- Core concepts

 ± Use Case Diagram tour 

 ± When to model use cases

 ±Use Case Modeling tips

 ± Examples: Library & Univer sity Registration

Page 4: CmpE135-OOAD-L09n

8/8/2019 CmpE135-OOAD-L09n

http://slidepdf.com/reader/full/cmpe135-ooad-l09n 4/46

L09-S4 Use Case ModelingFall 2002 SJSU ± CmpE M.E. Fayad

What is use case modeling?

use case model: a view of a system

that emphasizes the behavior  as it appear s to outside user s. A use case 

model partitions system functionality 

into transactions (µuse cases¶) that 

are meaningful to user s (µactor s¶).

4

Page 5: CmpE135-OOAD-L09n

8/8/2019 CmpE135-OOAD-L09n

http://slidepdf.com/reader/full/cmpe135-ooad-l09n 5/46

L09-S5 Use Case ModelingFall 2002 SJSU ± CmpE M.E. Fayad

Use Case Modeling: Core ElementsConstr uct Description Syntax

use case   A sequence of actions, includingvariants, that a system (or other entity) can perform, interacting with

actors of the system.actor    A coherent set of roles that users

of use cases play when interactingwith these use cases.

systemboundary 

Represents the boundary betweenthe physical system and the actorswho interact with the physicalsystem.

UseCaseName

 

ct ¡  r Name

5

Page 6: CmpE135-OOAD-L09n

8/8/2019 CmpE135-OOAD-L09n

http://slidepdf.com/reader/full/cmpe135-ooad-l09n 6/46

L09-S6 Use Case ModelingFall 2002 SJSU ± CmpE M.E. Fayad

Constr uct Description Syntax

association The participation of an actor in a usecase. i.e., instance of an actor andinstances of a use case communicatewith each other.

extend A relationship from an extension usecase to a base use case, specifyinghow the behavior for the extensionuse case can be inserted into thebehavior defined for the base usecase.

generalization A taxonomic relationship between amore general use case and a morespecific use case.

Use Case Modeling: Core Relationships

<<extend>>

6

Page 7: CmpE135-OOAD-L09n

8/8/2019 CmpE135-OOAD-L09n

http://slidepdf.com/reader/full/cmpe135-ooad-l09n 7/46

L09-S7 Use Case ModelingFall 2002 SJSU ± CmpE M.E. Fayad

Constr uct Description Syntax

include An relationship from a base use caseto an inclusion use case, specifyinghow the behavior for the inclusion usecase is inserted into the behavior defined for the base use case.

Use Case Modeling: Core Relationships (cont¶d)

<<include>>

7

Page 8: CmpE135-OOAD-L09n

8/8/2019 CmpE135-OOAD-L09n

http://slidepdf.com/reader/full/cmpe135-ooad-l09n 8/46

L09-S8 Use Case ModelingFall 2002 SJSU ± CmpE M.E. Fayad

Shows use cases, actor  and their  

relationships Use case internals can be specif ied by 

text and/or  interaction diagrams Kinds

 ± use case diagram

 ± use case description

Use Case Diagram Tour

8

Page 9: CmpE135-OOAD-L09n

8/8/2019 CmpE135-OOAD-L09n

http://slidepdf.com/reader/full/cmpe135-ooad-l09n 9/46

L09-S9 Use Case ModelingFall 2002 SJSU ± CmpE M.E. Fayad

Fig. 3-44, UML N otation Guide

C u s tom er 

Su pe rv i so r  

S al es pe r so nPlac  e

E s t a b l i s hc r ed i t 

C h e c k 

T el ep h o n e C a t a l o g  

Fi l l   o r d e r s

S h i  p p in g  C l e r k 

s t a t  u s

o r de r 

Use Case Model

9

Page 10: CmpE135-OOAD-L09n

8/8/2019 CmpE135-OOAD-L09n

http://slidepdf.com/reader/full/cmpe135-ooad-l09n 10/46

L09-S10 Use Case ModelingFall 2002 SJSU ± CmpE M.E. Fayad

Fig. 3-45, UML N otation Guide

Use Case Diagram: Relationships

additional requests :

Order Product

SupplyArrange

«include»«include»«include»

RequestCatalog

«extend»Extension points

PaymentCustomer Data

after creation of the order 

Place Order 

1 * the salesperson asks for the catalog

Page 11: CmpE135-OOAD-L09n

8/8/2019 CmpE135-OOAD-L09n

http://slidepdf.com/reader/full/cmpe135-ooad-l09n 11/46

L09-S11 Use Case ModelingFall 2002 SJSU ± CmpE M.E. Fayad

Fig. 3-46, UML N otation Guide

Use Case Diagram: Actor Relationships

E tablis

C dit

Place

Or der 

Salesper so

Supervisor 

1 *

1 *

11

Page 12: CmpE135-OOAD-L09n

8/8/2019 CmpE135-OOAD-L09n

http://slidepdf.com/reader/full/cmpe135-ooad-l09n 12/46

L09-S12 Use Case ModelingFall 2002 SJSU ± CmpE M.E. Fayad

Use Case Description: Change FlightActor s: traveler, client account db, airline reservation system

Preconditions:

y Traveler has logged on to the system and selected µchangeflight itinerary¶ option

Basic cour se

y System retrieves traveler¶s account and flight itinerary fromclient account database

y System asks traveler to select itinerary segment she wants tochange; traveler selects itinerary segment.

y System asks traveler for new departure and destinationinformation; traveler provides information.

y If flights are available theny «

y System displays transaction summary.

Alternative cour ses

y If no flights are available then «

12

Page 13: CmpE135-OOAD-L09n

8/8/2019 CmpE135-OOAD-L09n

http://slidepdf.com/reader/full/cmpe135-ooad-l09n 13/46

L09-S13 Use Case ModelingFall 2002 SJSU ± CmpE M.E. Fayad

When to model use cases

Model user requirements with use cases.

Model test scenarios with use cases.

If you are using a use-case driven method

 ± start with use cases and derive your structuraland behavioral models from it.

If you are not using a use-case driven method

 ± make sure that your use cases are consistentwith your structural and behavioral models.

13

Page 14: CmpE135-OOAD-L09n

8/8/2019 CmpE135-OOAD-L09n

http://slidepdf.com/reader/full/cmpe135-ooad-l09n 14/46

L09-S14 Use Case ModelingFall 2002 SJSU ± CmpE M.E. Fayad

Use Case Modeling Tips

Make sure that each use case describes a signif icant chunk of 

system usage that is under standable by both domain experts and

pr ogrammer s

When def ining 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 actor s who are required

Large number s of use cases should be organized into packages

Page 15: CmpE135-OOAD-L09n

8/8/2019 CmpE135-OOAD-L09n

http://slidepdf.com/reader/full/cmpe135-ooad-l09n 15/46

L09-S15 Use Case ModelingFall 2002 SJSU ± CmpE M.E. Fayad

Sample Problem Statement: Library System

You have been contracted to develop a 

computer system for  a univer sity library. The 

library currently uses a 1960s pr ogram,written in an obsolete language, for some 

simple bookkeeping tasks, and a car d index,

for user  br owsing.  You are asked to build an 

interactive system which handles both of 

these aspects online.*

*Example from: ³Using UML´, by: Pooley and Stevens

15

Page 16: CmpE135-OOAD-L09n

8/8/2019 CmpE135-OOAD-L09n

http://slidepdf.com/reader/full/cmpe135-ooad-l09n 16/46

L09-S16 Use Case ModelingFall 2002 SJSU ± CmpE M.E. Fayad

First Step!

Time to start gathering the user requirements.

 ± Different users will have different, sometimes

conflicting priorities ± Users will not, necessarily know what they

want

 ± It is very possible to miss something vital

 ± The managers do not always know what theusers have to do

 ± Users can be, and frequently are, hostile.

Why? What can be done about it?16

Page 17: CmpE135-OOAD-L09n

8/8/2019 CmpE135-OOAD-L09n

http://slidepdf.com/reader/full/cmpe135-ooad-l09n 17/46

L09-S17 Use Case ModelingFall 2002 SJSU ± CmpE M.E. Fayad

The Use Case Model

We must now identify the users of the system

and the tasks they must undertake with thesystem. The details of the use case should

be documented, using a Use Case Template.

17

Page 18: CmpE135-OOAD-L09n

8/8/2019 CmpE135-OOAD-L09n

http://slidepdf.com/reader/full/cmpe135-ooad-l09n 18/46

L09-S18 Use Case ModelingFall 2002 SJSU ± CmpE M.E. Fayad

The Use Case Template

Use Case TemplatePACKAGE:  _________________  [Description ( an over  view  of  the  package)].

USE CASES: [A  package will  have one or more U se C ases].

Use Case No.: [1.1 ] 

Use Case Title: [A descriptive title] 

[E  x. adding  a new   patient, or  adding  a new  role].

Actor s: _______ ,  _______ ,  _______ ,  _______ .

[Any  users of  the U se C ase, ex. human, machine, other  systems or  subsystems].

Corresponding Roles: _______ ,  _______ ,  _______ ,  _______ .

[T here is a different  role  per  actor  in every U se C ase].

Classes: _______ ,  _______ ,  _______ ,  _______ .

[ List  all  the classes within the U se C ase Description].

Enduring Business Themes (EBT): _______ ,  _______ ,  _______ 

Business Objects (BO): _______ ,  _______ ,  _______ ,  _______ .

Industrial Objects (IO): _______ ,  _______ ,  _______ ,  _______ .

[T his represents a clear  classification of  all  the classes within the use case description].

Description of the Use Case:

[Describes the data flow  and  the logic  flow  of  the U se C ase].  18

Page 19: CmpE135-OOAD-L09n

8/8/2019 CmpE135-OOAD-L09n

http://slidepdf.com/reader/full/cmpe135-ooad-l09n 19/46

L09-S19 Use Case ModelingFall 2002 SJSU ± CmpE M.E. FayadCopyright© 1997 by Rational Software Corporation

Documenting Use Cases

A flow of events description is created for each use case

 ± Written from an actors point of view

Details what the system must provide to the actor whenthe use case is executed

Typical contents

 ± How the use case starts and ends

 ± ormal flow of events

 ± Alternate flow of events

 ± Exceptional flow of events

19

Page 20: CmpE135-OOAD-L09n

8/8/2019 CmpE135-OOAD-L09n

http://slidepdf.com/reader/full/cmpe135-ooad-l09n 20/46

L09-S20 Use Case ModelingFall 2002 SJSU ± CmpE M.E. Fayad

Actors

An actor is someone or something that must interact with the

system under development

BookBorrower 

Browser 

Librarian

JournalBorrower 

Page 21: CmpE135-OOAD-L09n

8/8/2019 CmpE135-OOAD-L09n

http://slidepdf.com/reader/full/cmpe135-ooad-l09n 21/46

L09-S21 Use Case ModelingFall 2002 SJSU ± CmpE 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

Checkout JournalCheckout Book Return Book

Page 22: CmpE135-OOAD-L09n

8/8/2019 CmpE135-OOAD-L09n

http://slidepdf.com/reader/full/cmpe135-ooad-l09n 22/46

L09-S22 Use Case ModelingFall 2002 SJSU ± CmpE M.E. Fayad

Use Case Description

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:

 ± Borr ow 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: P ooley and Stevens 22

Page 23: CmpE135-OOAD-L09n

8/8/2019 CmpE135-OOAD-L09n

http://slidepdf.com/reader/full/cmpe135-ooad-l09n 23/46

L09-S23 Use Case ModelingFall 2002 SJSU ± CmpE M.E. Fayad

Use Case Diagram for the first iteration

*Example from: ³Using UML´, by: Pooley and Stevens

23

Page 24: CmpE135-OOAD-L09n

8/8/2019 CmpE135-OOAD-L09n

http://slidepdf.com/reader/full/cmpe135-ooad-l09n 24/46

L09-S24 Use Case ModelingFall 2002 SJSU ± CmpE M.E. Fayad

What Requirements would an ideal system satisfy?

Books and Journals: The library contains books and

 journals. It may have several copies of a given book. Some

of the books are for short term loans only.  All other booksmay be borrowed by any library member for three weeks.

Only members of staff may borrow journals. Members of the

library can normally borrow up to six items at a time, but

members of staff may borrow up to 12 items at one time.

New books and journals arrive regularly, and are sometimesdisposed of. The current year¶s journals are sent away to be

bound into volumes at the end of each year.*

*Example from: ³Using UML´, by: Pooley and Stevens

24

Page 25: CmpE135-OOAD-L09n

8/8/2019 CmpE135-OOAD-L09n

http://slidepdf.com/reader/full/cmpe135-ooad-l09n 25/46

L09-S25 Use Case ModelingFall 2002 SJSU ± CmpE M.E. Fayad

What Requirements would an ideal system satisfy?

Borr owing: It is essential that the system keep track of 

when books and journals are borrowed and returned, since

the current system already does that. The new system

should produce reminders when a book is overdue. Theremay in future be a requirement for users to be able to extend

the loan of a book if it is not reserved.

Br owsing: The system should allow users to search for a

book on a particular topic, by a particular author, etc., to

check whether a copy of the book is available for loan, and if not, to reserve the book.  Anyone can browse in the library.*

*Example from: ³Using UML´, by: Pooley and Stevens

25

Page 26: CmpE135-OOAD-L09n

8/8/2019 CmpE135-OOAD-L09n

http://slidepdf.com/reader/full/cmpe135-ooad-l09n 26/46

L09-S26 Use Case ModelingFall 2002 SJSU ± CmpE M.E. Fayad

Use Cases for the library

*Example from: ³Using UML´, by: Pooley and Stevens

26

Page 27: CmpE135-OOAD-L09n

8/8/2019 CmpE135-OOAD-L09n

http://slidepdf.com/reader/full/cmpe135-ooad-l09n 27/46

Page 28: CmpE135-OOAD-L09n

8/8/2019 CmpE135-OOAD-L09n

http://slidepdf.com/reader/full/cmpe135-ooad-l09n 28/46

L09-S28 Use Case ModelingFall 2002 SJSU ± CmpE M.E. Fayad

Copyright© 1997 by Rational Software Corporation

Actors

Student

Registrar 

Professor 

Billing System 28

Page 29: CmpE135-OOAD-L09n

8/8/2019 CmpE135-OOAD-L09n

http://slidepdf.com/reader/full/cmpe135-ooad-l09n 29/46

L09-S29 Use Case ModelingFall 2002 SJSU ± CmpE M.E. Fayad

Copyright© 1997 by Rational Software Corporation

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

Maintain ScheduleMaintain Curriculum Request Course Roster  

Page 30: CmpE135-OOAD-L09n

8/8/2019 CmpE135-OOAD-L09n

http://slidepdf.com/reader/full/cmpe135-ooad-l09n 30/46

L09-S30 Use Case ModelingFall 2002 SJSU ± CmpE M.E. Fayad

Copyright© 1997 by Rational Software Corporation

Maintain Curriculum: Flow of Events (description)

This use case begins when the Registrar logs onto the 

Registration System and enter s his/her passwor d. The system

verif ies that the passwor d is valid (E-1) and pr ompts the 

Registrar  to select the current semester or  a future semester (E-

2). The Registrar  enter s the desired semester . The systempr ompts the pr of essor  to select the desired activity: ADD,

DELETE, REVIEW, or QUIT.

If the activity selected is ADD, the S-1: Add a Cour se subflow is

per for med.

If the activity selected is DELETE, the S-2: Delete a Cour se 

subflow is per for med. If the activity selected is REVIEW, the S-3: Review Curriculum

subflow is per for med.

If the activity selected is QUIT, the use case ends. 30

Page 31: CmpE135-OOAD-L09n

8/8/2019 CmpE135-OOAD-L09n

http://slidepdf.com/reader/full/cmpe135-ooad-l09n 31/46

L09-S31 Use Case ModelingFall 2002 SJSU ± CmpE M.E. Fayad

Copyright© 1997 by Rational Software Corporation

Use Case Model

Use case diagrams are created to visualize the relationshipsbetween actor s and use cases

Student

Registrar 

Professor 

Maintain Schedule

Maintain Curriculum

Request Course Roster 

Billing System

Page 32: CmpE135-OOAD-L09n

8/8/2019 CmpE135-OOAD-L09n

http://slidepdf.com/reader/full/cmpe135-ooad-l09n 32/46

L09-S32 Use Case ModelingFall 2002 SJSU ± CmpE M.E. Fayad

Copyright© 1997 by Rational Software Corporation

Uses and Extends Use Case Relationships

As the use cases are documented, other use caserelationships may be discovered

 ± A uses relationship shows behavior that is common toone or more use cases

 ± An extends relationship shows optional behavior 

Register for courses

<<uses>>

Logon validation<<uses>>

Maintain curriculum

Page 33: CmpE135-OOAD-L09n

8/8/2019 CmpE135-OOAD-L09n

http://slidepdf.com/reader/full/cmpe135-ooad-l09n 33/46

L09-S33 Use Case ModelingFall 2002 SJSU ± CmpE M.E. Fayad

Possible Problems with Use Cases

1. Use Cases emphasize ordering. This can be

considered to be incompatible with object

technology.

2. Over modeling  ± Leads to requirement inflation.

33

Page 34: CmpE135-OOAD-L09n

8/8/2019 CmpE135-OOAD-L09n

http://slidepdf.com/reader/full/cmpe135-ooad-l09n 34/46

L09-S34 Use Case ModelingFall 2002 SJSU ± CmpE M.E. Fayad

Cautions

Do not invent requirements!

 ± Use cases are about the user¶s requirements,not about what you, as the designer might

think that the system could usefully do!

34

Page 35: CmpE135-OOAD-L09n

8/8/2019 CmpE135-OOAD-L09n

http://slidepdf.com/reader/full/cmpe135-ooad-l09n 35/46

L09-S35 Use Case ModelingFall 2002 SJSU ± CmpE M.E. Fayad

Acknowledgements

Object Modeling with OMG UML:Introduction to UML

 ± Cris Kobryn

 ± Chief Scientist, InLine SoftwareCo-Chair UML Revision Task Force August 2000

³ Using UML: Software Engineering With Objects and

Components´

by: Rob Pooley and Perdita Stevens

³ Analysis and Design with UML´Copyright© 1997 by Rational Software Corporation

 © 1999-2000 OMG and Tutorial Contributors: EDS, IBM, Enea Data, InLine Software,IntelliCorp, Kabira Technologies, Klasse Objecten, ObjectTime Ltd., Rational Software, Unisys

35

Page 36: CmpE135-OOAD-L09n

8/8/2019 CmpE135-OOAD-L09n

http://slidepdf.com/reader/full/cmpe135-ooad-l09n 36/46

L09-S36 Use Case ModelingFall 2002 SJSU ± CmpE M.E. Fayad

Use Case No.: 1.1.1

Use Case Title: F ind C andidate

Actor s: Registrar  Roles: Data Entry Clerk (Registrar),

Classes:  IDSession, PersonProfile, PersonIdentifier, PersonTraits, CandidateListGenerator, DataManager 

Enduring Business Themes: (EBT): identity, security,

Business Objects: IDSession, IDManager, DataManager,

PersonIdentifier  Industrial Objects: CandidateList, PersonTraits, PersonProfiles,

SecurityManager, TraitGatekeeper 

36

Sample Use Case from Philips Project (1)

Page 37: CmpE135-OOAD-L09n

8/8/2019 CmpE135-OOAD-L09n

http://slidepdf.com/reader/full/cmpe135-ooad-l09n 37/46

L09-S37 Use Case ModelingFall 2002 SJSU ± CmpE M.E. Fayad

Description of the Use Case:

1. The Registrar enters the information about a person into theSystem.

2. IDSession clears the request with Security.

3. The System tells the Person-Identifier to search for candidates.

4. The Person-Identifier gives the request to its DataManager 

5. The DataManager determines a list of candidates, using itsCandidateListGenerator and its set of PersonProfiles and returns itto the System.

6. The Registrar chooses the candidate from the list thatrepresents the person.

37

Sample Use Case from Philips Project (2)

Page 38: CmpE135-OOAD-L09n

8/8/2019 CmpE135-OOAD-L09n

http://slidepdf.com/reader/full/cmpe135-ooad-l09n 38/46

L09-S38 Use Case ModelingFall 2002 SJSU ± CmpE M.E. Fayad

Use Case No.: 1.2.1

Use Case Title: R egister N ew I D

Actor s: Registrar  Roles: Data Entry Clerk (Registrar),

Classes:  IDSession, IDManager, PersonProfile, PersonTraits,CandidateList, PersonIdentifier 

Enduring Business Themes (EBT): identity, security

Business Objects (BO): IDSession, IDManager , PersonIdentifier 

Industrial Objects (IO): PersonProfile, PersonTraits, CandidateList

38

Sample Use Case from Philips Project (3)

Page 39: CmpE135-OOAD-L09n

8/8/2019 CmpE135-OOAD-L09n

http://slidepdf.com/reader/full/cmpe135-ooad-l09n 39/46

L09-S39 Use Case ModelingFall 2002 SJSU ± CmpE M.E. Fayad

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

Sample Use Case from Philips Project (4)

Page 40: CmpE135-OOAD-L09n

8/8/2019 CmpE135-OOAD-L09n

http://slidepdf.com/reader/full/cmpe135-ooad-l09n 40/46

L09-S40 Use Case ModelingFall 2002 SJSU ± CmpE M.E. Fayad

Exceptional Flow of Events 01:  If any of the identifying information

entered by the Registrar is incomplete or invalid the system displays

corresponding error message(s). The system will not validate the

New Person until all identifying information is made available.

Exceptional Flow of Events 02: In case the system determines that

one or more of the identifying information for a person matches one or 

more person(s) already in the system the Registrar is displayed with a

screen listing all the person(s) meeting the search criteria. The

Registrar is then given the opportunity to either create the person inthe system with a new ID or pick one from the selection list.

40

Sample Use Case from Philips Project (5)

Page 41: CmpE135-OOAD-L09n

8/8/2019 CmpE135-OOAD-L09n

http://slidepdf.com/reader/full/cmpe135-ooad-l09n 41/46

L09-S41 Use Case ModelingFall 2002 SJSU ± CmpE M.E. Fayad

Use Case No.: 1.3.1

Use Case Title: Get Patient Profile using Patient ID

Actor s / Roles: Nurse, Patient, and Profile  Access Classes: 

Enduring Business Themes (EBT): Diagnosis, Customer Service

and Complete Medical History

Business Objects (BO): Profile  Access, Identify Person and

Identity

Industrial Objects (IO): Identity  Access

41

Sample Use Case from Philips Project (6)

Page 42: CmpE135-OOAD-L09n

8/8/2019 CmpE135-OOAD-L09n

http://slidepdf.com/reader/full/cmpe135-ooad-l09n 42/46

L09-S42 Use Case ModelingFall 2002 SJSU ± CmpE M.E. Fayad

Description of the Use Case:

1. The Nurse enters the Person ID for the person.

2. The Person Identification system determines the validity of thePerson ID.

3. The Get Profile System returns the profile the specified Person ID.

Exceptional Flow of Events 01: If the Person ID is invalid an error 

message is displayed. The nurse then can decide either to search the

system with person identification information or redirect the person to a

Registrar.

42

Sample Use Case from Philips Project (7)

Page 43: CmpE135-OOAD-L09n

8/8/2019 CmpE135-OOAD-L09n

http://slidepdf.com/reader/full/cmpe135-ooad-l09n 43/46

L09-S43 Use Case ModelingFall 2002 SJSU ± CmpE 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 )

Page 44: CmpE135-OOAD-L09n

8/8/2019 CmpE135-OOAD-L09n

http://slidepdf.com/reader/full/cmpe135-ooad-l09n 44/46

L09-S44 Use Case ModelingFall 2002 SJSU ± CmpE M.E. Fayad

What are the use case modeling good, bad, and ugly?

Def ine: Actor , r ole, and use case

What are the diff erences between use cases andscenarios?

What are the diff erences between use case and a pr ocess?

44

Discussion Questions

Page 45: CmpE135-OOAD-L09n

8/8/2019 CmpE135-OOAD-L09n

http://slidepdf.com/reader/full/cmpe135-ooad-l09n 45/46

L09-S45 Use Case ModelingFall 2002 SJSU ± CmpE M.E. Fayad

Discuss the ways to analyze a 

pr oblem.

What is a pr oblem?

What are the elements of pr oblem

analysis?

45

Questions for the Next Lecture

Page 46: CmpE135-OOAD-L09n

8/8/2019 CmpE135-OOAD-L09n

http://slidepdf.com/reader/full/cmpe135-ooad-l09n 46/46

L09-S46 Use Case ModelingFall 2002 SJSU ± CmpE M.E. Fayad

Task 1: Assignment # 1 is due on 

 ___________. Late assignments are not acceptable.

Task 2: Check the web site for  new postings

46

Tasks for Next Lecture