Tải bản đầy đủ - 0 (trang)
Chapter 7.  Use Case Diagrams

Chapter 7.  Use Case Diagrams

Tải bản đầy đủ - 0trang

www.it-ebooks.info



UML 2.0 in a Nutshell

ByDan Pilone,Neil Pitman

7.1. Use Cases

...............................................

Publisher:O'Reilly

Pub Date: June 2005

ISBN:0-596-00795-7

Use cases represent

distinct pieces of functionality for a system, a component, or even a

234 have a name that is typically a few words describing the required

class. Each use Pages:

case must



functionality, such as View Error Log. UML provides two ways to draw a use case. The first is

an oval with the name of the use case in the center. Figure 7-1 shows a basic use case.

Table of Contents | Index



System developers have used

modeling

for decades

to specify, visualize,

Figure

7-1.languages

A simple

use case

construct, and document systems. The Unified Modeling Language (UML) is one of those

languages. UML makes it possible for team members to collaborate by providing a common

language that applies to a multitude of different systems. Essentially, it enables you to

communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means

you're probably confronting this rich and expressive language more than ever before. And

even though you may not write UML diagrams yourself, you'll still need to interpret

diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like

youcan

whodivide

must aread,

create,oval

andinto

understand

systemtoartifacts

using

UML.

You

use case's

compartments

provideexpressed

more detail

about

the use

Furthermore,

it's been fully

revised

to cover

2.0 of included

the language.

case,

such as extension

points

(see "Use

Caseversion

Extension"),

use cases (see "Use Case

Inclusion"), or the modeling of specific constraints. Figure 7-2 shows a use case oval with a

This comprehensive

new edition

not only provides a quick-reference to all UML 2.0 diagram

compartment

listing extension

points.

types, it also explains key concepts in a way that appeals to readers already familiar with

However,

the oval representation

of use

cases doesn't hold up well with detailed

UML or object-oriented

programming

concepts.

compartments. UML recommends you use the classifier notation if you want to provide details

about

use case. Show the use case as a rectangle, with the use case oval in the top-right

Topicsa include:

corner. Now, place the name of the use case in the top, in bold. You can then divide the

classifier into compartments as needed. Typical

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML



Figure

7-2. Use case with a compartment showing extension points

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,

and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)



If you're new to UML, a tutorial with realistic examples has even been included to help you

quickly familiarize

yourself

with thepoints

system.

compartment

names

are extension

and included use cases.Figure 7-3 shows the

same use case as in Figure 7-2, but in classifier notation.



Figure 7-3. Use case in classifier notation



www.it-ebooks.info



UML 2.0 in a Nutshell

ByDan Pilone,Neil Pitman

...............................................

Publisher:O'Reilly

Pub Date: June 2005

ISBN:0-596-00795-7

Pages:234



UML makes a clear distinction that the term use case strictly applies to the UML element and

Tablename.

of Contents

Index

its

Full| documentation

of a use case is considered an instantiation of the use case. This

is a subtle distinction, but it allows you to document a use case whatever way best captures

the use case's functionality. You can document a use case in a text document, state machine,

interaction

diagram, have

activity

diagram,

or languages

anything else

conveys

the details

of the

System developers

used

modeling

for that

decades

to specify,

visualize,

functionality

in

a

meaningful

way

to

your

reader.

construct, and document systems. The Unified Modeling Language (UML) is one of those

languages. UML makes it possible for team members to collaborate by providing a common

language that applies to a multitude of different systems. Essentially, it enables you to

communicate solutions in a consistent, tool-supported language.



Today, UML has become the standard method for modeling software systems, which means

you're probably confronting this rich and expressive language more than ever before. And

even though you may not write UML diagrams yourself, you'll still need to interpret

diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like

you who must read, create, and understand system artifacts expressed using UML.

Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram

types, it also explains key concepts in a way that appeals to readers already familiar with

UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,

and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)



If you're new to UML, a tutorial with realistic examples has even been included to help you

quickly familiarize yourself with the system.



www.it-ebooks.info



UML 2.0 in a Nutshell

ByDan Pilone,Neil Pitman

7.2. Actors

...............................................

Publisher:O'Reilly

Pub Date: June 2005

0-596-00795-7

A use case mustISBN:

be initiated

by someone or something outside the scope of the use case. This

234 an actor . An actor doesn't need to be a human user; any external

interested partyPages:

is called



system or element outside of the use case may trigger the use case (or be the recipient of use

case results) and should be modeled as an actor. For example, it is very common to model

Table system

of Contentsclock

| Index

the

as an actor that triggers a use case at a given time or interval.

An actor can have several different representations in UML. The first is a stick figure with the

name

of the

actor written

near modeling

the icon (usually

right

it). Figure

7-4 shows

an actor

System

developers

have used

languages

forbelow

decades

to specify,

visualize,

icon.

construct, and document systems. The Unified Modeling Language (UML) is one of those

languages. UML makes it possible for team members to collaborate by providing a common

Alternatively,

actor can

shown using

the classifier

notation.

You represent

language thatan

applies

to a be

multitude

of different

systems.

Essentially,

it enables the

youactor

to with

acommunicate

rectangle, with

the

keyword

actor

at

the

top

and

the

name

of

the

actor

in

bold

immediately

solutions in a consistent, tool-supported language.

below that. Because actors don't typically have compartments, this representation isn't used

very

often.

7-5 shows

actor in

classifier

Today,

UMLFigure

has become

the an

standard

method

for notation.

modeling software systems, which means



you're probably confronting this rich and expressive language more than ever before. And

If it is helpful, you may use custom icons to clearly distinguish different types of actors. For

even though you may not write UML diagrams yourself, you'll still need to interpret

example, you can show an external database system using a database

diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like

you who must read, create, and understand system artifacts expressed using UML.

Figure

An actor

stick

representation

Furthermore,

it's 7-4.

been fully

revised using

to coverthe

version

2.0 figure

of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram

types, it also explains key concepts in a way that appeals to readers already familiar with

UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams



Figure 7-5. An actor using classifier notation



Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,

and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)



If you're new to UML, a tutorial with realistic examples has even been included to help you

quickly familiarize yourself with the system.

icon while showing the system administrator as a stick figure. Figure 7-6 shows exactly this

set of actors.



www.it-ebooks.info



Figure 7-6. Actor with a custom icon

UML 2.0 in a Nutshell

ByDan Pilone,Neil Pitman

...............................................

Publisher:O'Reilly

Pub Date: June 2005

ISBN:0-596-00795-7

Pages:234



Table of Contents | Index



7.2.1. Actor/Use Case Associations

System developers have used modeling languages for decades to specify, visualize,

construct,

and

document

systems.

Modeling

Language

(UML) isbetween

one of those

You

typically

associate

an actor

withThe

oneUnified

or more

use cases.

A relationship

an actor

languages.

UMLindicates

makes itthe

possible

for teamthe

members

to collaborate

providing

common

and

a use case

actor initiates

use case,

the use casebyprovides

thea actor

with

language

to a an

multitude

of different

it enables

you line.

to

results,

or that

both.applies

You show

association

betweensystems.

an actorEssentially,

and a use case

as a solid

communicate solutions

a consistent,

tool-supported

Conventionally

you read in

use

case diagrams

from left to language.

right, with actors initiating use cases

on the left and actors that receive use case results on the right. However, depending on the

Today,orUML

has

the it

standard

method

fortomodeling

software

systems,

which

means

model

level

of become

complexity,

may make

sense

group actors

differently.

Figure

7-7

shows

you're

confronting

rich

and expressive language more than ever before. And

an

actorprobably

communicating

withthis

a use

case.

even though you may not write UML diagrams yourself, you'll still need to interpret

diagrams written by others.

UML 2.0

in a Nutshell

O'Reillyassociated

feels your pain.

been

craftedItem

for professionals

Figure

7-7. from

An actor

toIt's

the

Order

use caselike

you who must read, create, and understand system artifacts expressed using UML.

Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram

types, it also explains key concepts in a way that appeals to readers already familiar with

UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

Though

notobject-oriented

part of the official

UML specification,

it istocommon

The

paradigm

and its relation

the UMLto see directional arrows on

association lines to indicate who initiates communication with whom. Note that the arrows

don't necessarily

restrict

the direction

of information flow; they simply point from the initiator

An integrated

approach

to UML diagrams

to the receiver of the communication. What happens after a use case begins execution is

Class

and Object,

Case,

Sequence,

Collaboration,

Component,

specified

elsewhere

(seeUse

"Use

Cases").

Figure 7-8

shows two Statechart,

actors and aActivity,

use case

with

and Deployment

directional

associations.Diagrams



Extension Mechanisms

The 7-8.

ObjectAn

Constraint

Language

(OCL)

Figure

example

of directed

associations between actors and

a use case

If you're new to UML, a tutorial with realistic examples has even been included to help you

quickly familiarize yourself with the system.



www.it-ebooks.info



UML 2.0 in a Nutshell

ByDan Pilone,Neil Pitman

...............................................

Publisher:O'Reilly

Pub Date: June 2005

ISBN:0-596-00795-7

Pages:234



Table of Contents | Index



7.2.2. System Boundaries

System developers have used modeling languages for decades to specify, visualize,

construct, and document systems. The Unified Modeling Language (UML) is one of those

By

definition,UML

usemakes

cases capture

thefor

functionality

of a particular

subject.

Anything anot

realized

languages.

it possible

team members

to collaborate

by providing

common

by

the subject

considered

outside the

system boundaries

and shoulditbe

modeled

astoan

language

that is

applies

to a multitude

of different

systems. Essentially,

enables

you

actor.

This technique

is very

useful in determining

the scope

and assignment of

communicate

solutions

in a consistent,

tool-supported

language.

responsibilities when designing a system, subsystem, or component. For example, if while you

are

modeling

an ATM

system,

your design

discussions

digress

into discussions

the details

Today,

UML has

become

the standard

method

for modeling

software

systems,of

which

means of

the

back-end

banking

system,

a use

model with language

clearly defined

system

boundaries

would

you're

probably

confronting

this

richcase

and expressive

more than

ever

before. And

identify

the banking

system

as anUML

actor

and therefore

outside

of the

problem.

even though

you may

not write

diagrams

yourself,

you'll the

stillscope

need to

interpret

diagrams written by others.

You represent system boundaries in a generic sense using a simple rectangle, with the name

of

the2.0

system

at the top.

Figure

7-9 feels

shows

the pain.

system

for for

theprofessionals

ATM machinelike

UML

in a Nutshell

from

O'Reilly

your

It'sboundaries

been crafted

mentioned

in the

previous

paragraph.

you who must

read,

create,

and understand system artifacts expressed using UML.

Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive

new edition

not onlyFunctionality

provides a quick-reference to all UML 2.0 diagram

7.2.3.

Using Actors

to Identify

types, it also explains key concepts in a way that appeals to readers already familiar with

UML ordon't

object-oriented

programming

Actors

need to have

a one-to-oneconcepts.

mapping to physical entities; in fact, they don't need

to be physical entities at all. UML allows for actors to represent roles of potential users of a

Topics include:

system.

For example, the system administrator may be the only physical user of a system,

but that administrator may wear many hats. It may be helpful to view the system from the

perspective

of a

database

backup administrator, deployment administrator,

The role

and

value ofadministrator,

UML in projects

and so on. By specifically identifying the various roles of actors that may use the system, you

can often

use cases

that would

gone unnoticed.

The discover

object-oriented

paradigm

and have

its relation

to the UMLFigure 7-10 shows a sample

diagram containing three types of administrators and example use cases.

An integrated approach to UML diagrams



Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,

and7-9.

Deployment

Figure

A useDiagrams

case diagram showing the system boundaries of an

ATM System

Extension Mechanisms



The Object Constraint Language (OCL)



If you're new to UML, a tutorial with realistic examples has even been included to help you

quickly familiarize yourself with the system.



www.it-ebooks.info



UML 2.0 in a Nutshell

ByDan Pilone,Neil Pitman

...............................................

Publisher:O'Reilly

Pub Date: June 2005

ISBN:0-596-00795-7

Pages:234



Table of Contents | Index



System developers have used modeling languages for decades to specify, visualize,

construct, and document systems. The Unified Modeling Language (UML) is one of those

languages. UML makes it possible for team members to collaborate by providing a common

language that applies to a multitude of different systems. Essentially, it enables you to

communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means

you're probably confronting this rich and expressive language more than ever before. And

even though you may not write UML diagrams yourself, you'll still need to interpret

diagrams

written by

Figure 7-10.

Anothers.

example of using specialized versions of an actor to



help find required functionality

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like

you who must read, create, and understand system artifacts expressed using UML.

Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram

types, it also explains key concepts in a way that appeals to readers already familiar with

UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,

and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)



If you're new to UML, a tutorial with realistic examples has even been included to help you

quickly familiarize yourself with the system.



www.it-ebooks.info



UML 2.0 in a Nutshell

ByDan Pilone,Neil Pitman

...............................................

Publisher:O'Reilly

Pub Date: June 2005

ISBN:0-596-00795-7

Pages:234



Table of Contents | Index



System developers have used modeling languages for decades to specify, visualize,

construct, and document systems. The Unified Modeling Language (UML) is one of those

languages. UML makes it possible for team members to collaborate by providing a common

language that applies to a multitude of different systems. Essentially, it enables you to

communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means

you're probably confronting this rich and expressive language more than ever before. And

even though you may not write UML diagrams yourself, you'll still need to interpret

diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like

you who must read, create, and understand system artifacts expressed using UML.

Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram

types, it also explains key concepts in a way that appeals to readers already familiar with

UML or object-oriented programming concepts.

Topics include:

The role and value of UML in projects

The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,

and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)



If you're new to UML, a tutorial with realistic examples has even been included to help you

quickly familiarize yourself with the system.



www.it-ebooks.info



UML 2.0 in a Nutshell

ByDan Pilone,Neil Pitman

7.3. Advanced

Use Case Modeling

...............................................

Publisher:O'Reilly

Pub Date:

June 2005

As it does for other

classifiers,

UML provides mechanisms for reusing and adding on to use

ISBN:

0-596-00795-7

cases and actors.

You

can expand an actor's capabilities or replace entire use cases using

Pages:

234

generalization . You

can

factor out common elements of use cases using included use cases, or

add on to base use cases using use caseextension .

Table of Contents | Index



7.3.1. Actor and Use Case Generalization

System developers have used modeling languages for decades to specify, visualize,

construct, and document systems. The Unified Modeling Language (UML) is one of those

Though

not officially

mentioned

in the

actors

and use cases

can be generalized

languages.

UML makes

it possible

for specification,

team members

to collaborate

by providing

a common

like

many

other

classifiers.

Actor

generalization

is

typically

used

to

pull

out

common

language that applies to a multitude of different systems. Essentially, it enables

you to

requirements

several

actors

to simplify modeling.

communicatefrom

solutions

in adifferent

consistent,

tool-supported

language.For example, Figure 7-10

shows several administrators and the use cases they need to invoke. You may have a

Database

Administrator

, athe

Backup

Administrator

a Deployment

, allmeans

with

Today, UML

has become

standard

method for, and

modeling

softwareAdministrator

systems, which

slightly

different needs.

However,

the and

majority

of the language

needs of the

individual

actors

may

you're probably

confronting

this rich

expressive

more

than ever

before.

And

overlap.

You can

out write

a generic

Administrator

actor

capture

the common

even though

youfactor

may not

UML System

diagrams

yourself, you'll

stilltoneed

to interpret

functionality,

and

then

specialize

to

identify

the

unique

needs

of

each

actor.

diagrams written by others.

You represent actor generalization like any other classifier; draw a solid line, with a closed

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like

arrow pointing from the specialized actor to the base actor. Figure 7-11 shows the same

you who must read, create, and understand system artifacts expressed using UML.

information as Figure 7-10 but in a much easier-to-read diagram.

Furthermore, it's been fully revised to cover version 2.0 of the language.

Use cases may be generalized as well. Typically use case generalization is used to express

This comprehensive

new edition

not

only provides

quick-reference

to all

UML 2.0 diagram

some

high-level functional

need of

a system

withouta going

into specifics.

Specializations

of a

types,

it

also

explains

key

concepts

in

a

way

that

appeals

to

readers

already

familiar

general use case introduce specific functionality. For example, a generic use case

can with

be

UML or object-oriented programming concepts.

Verify Passenger Identity, and specializations of that use case can be Check Passenger

Fingerprint and Verify Passenger's RFID Tag. It is important to notice that even with use

Topics

include:

case

generalization,

you should still discuss functionality, not implementation. You should not

have specializations of a use case for different ways to implement the same functionality , only

to represent

different

functionality

The role

and value

of UML in. projects

You represent

use case generalization

just

you do

generalization: using a solid line,

The object-oriented

paradigm and

itslike

relation

to actor

the UML

with a closed arrow pointing from the specialized use case to the base use case. If the general

use case

abstract functionality

(meaning it's a functional concept but doesn't

An represents

integrated approach

to UML diagrams

actually explain how a user would do something), you show the name of the use case in

italics.Class

Figureand

7-12

showsUse

theCase,

verification

use cases

and theirStatechart,

relationships.

Object,

Sequence,

Collaboration,

Activity, Component,

and Deployment Diagrams



Mechanisms

7.3.2.Extension

Use Case

Inclusion

The Object Constraint Language (OCL)

You can factor out common functionality from several use cases by creating a shared,

included use case. Unlike in use case extension (discussed next), the use case that includes

another use case is typically not complete on its own. The included functionality isn't

If you're new

to UML,

examples

even

to help you

considered

optional;

it a

is tutorial

factoredwith

out realistic

simply to

allow forhas

reuse

in been

other included

use cases.

quickly familiarize yourself with the system.

You show use case inclusion using a dashed line, with an open arrow (dependency) pointing

from the base use case to the included use case. Label the line with the keyword include.

Figure 7-13 shows an example of use case inclusion.



www.it-ebooks.info



Figure 7-11. Actor generalization, in which the System Administrator

is the generic base actor and the lower three are specializations

UML 2.0 in a Nutshell

ByDan Pilone,Neil Pitman

...............................................

Publisher:O'Reilly

Pub Date: June 2005

ISBN:0-596-00795-7

Pages:234



Table of Contents | Index



System developers have used modeling languages for decades to specify, visualize,

construct, and document systems. The Unified Modeling Language (UML) is one of those

languages. UML makes it possible for team members to collaborate by providing a common

language that applies to a multitude of different systems. Essentially, it enables you to

communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means

you're probably confronting this rich and expressive language more than ever before. And

even though you may not write UML diagrams yourself, you'll still need to interpret

diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like

you who must read, create, and understand system artifacts expressed using UML.

Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram

types, it also explains key concepts in a way that appeals to readers already familiar with

UML or object-oriented programming concepts.

Topics include:

The role and value

of UML7-12.

in projects

Figure

Use



case generalization



The object-oriented paradigm and its relation to the UML

An integrated approach to UML diagrams

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,

and Deployment Diagrams

Extension Mechanisms

The Object Constraint Language (OCL)



If you're new to UML, a tutorial with realistic examples has even been included to help you

quickly familiarize yourself with the system.



www.it-ebooks.info



Include or UML

Includes?

2.0 in a Nutshell

ByDan Pilone,Neil Pitman



Often there is disagreement

between UML modelers as to whether the proper

...............................................

keywords are include

and

extend

or includes and extends. One would think the

Publisher:O'Reilly

UML specification

put this

Pub would

Date: June

2005to rest. However, as of the UML 2.0 specification,

the use case section

states that the keywords are include and extend, and then

ISBN:0-596-00795-7

Pages:

234

proceeds to show

examples

using includes and extends! We think it's safe to say,

that either is acceptable.

Table of Contents | Index



Figure

7-13.

Use case

inclusion

System developers have used

modeling

languages

for decades

to specify, visualize,

construct, and document systems. The Unified Modeling Language (UML) is one of those

languages. UML makes it possible for team members to collaborate by providing a common

language that applies to a multitude of different systems. Essentially, it enables you to

communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means

you're probably confronting this rich and expressive language more than ever before. And

even though you may not write UML diagrams yourself, you'll still need to interpret

diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like

you who must read, create, and understand system artifacts expressed using UML.

Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram

types, it also explains key concepts in a way that appeals to readers already familiar with

UML or object-oriented programming concepts.

Topics include:



7.3.3. Use Case Extension

The role and value of UML in projects

The object-oriented

and its relation

to the to

UML

UML provides

the ability toparadigm

plug in additional

functionality

a base use case if specified

conditions are met. For example, if you are modeling a banking application, you can have a

An named

integrated

approach to UML diagrams

use case

Open Account that specifies how the user can create a new account with the

bank. You can offer a joint account that allowed a user to add other people to his account.

Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,

The joint account functionality can be captured with a different, use case named Add Joint

and Deployment Diagrams

Member. In this case the specified condition for the extension is more than one member on the

bank application.

Extension Mechanisms

UML clearly

specifies

that a base

use case

should be a complete use case on its own. The

The Object

Constraint

Language

(OCL)

extension use cases are typically smaller in scope and represent additional functionality, so

they may not be useful outside the context of the base use case.

Any

use case

wantatotutorial

extendwith

must

have clearly

defined

. Antoextension

If you're

newyou

to UML,

realistic

examples

has extension

even beenpoints

included

help you

point

is afamiliarize

specification

of some

in the use case where an extension use case can plug in

quickly

yourself

withpoint

the system.

and add functionality. UML doesn't have a particular syntax for extension points; they are

typically freeform text, or step numbers if the use case functionality is represented as a

numbered list.

You list extension points in a use case oval, or in a separate compartment when using the

classifier notation. Figure 7-14 shows a use case with extension points.



www.it-ebooks.info



2.0 inOval

a Nutshell

Figure UML

7-14.

and classifier notation for a use case with

ByDan Pilone,Neil Pitman extension points

...............................................

Publisher:O'Reilly

Pub Date: June 2005

ISBN:0-596-00795-7

Pages:234



Table of Contents | Index



System developers have used modeling languages for decades to specify, visualize,

construct,

andadocument

systems. The

Unified Modeling

(UML)

is arrow

one of those

You

represent

use case extension

by showing

a dashed Language

line, with an

open

languages. UML

makesfrom

it possible

for teamuse

members

by providing

a common

(dependency)

pointing

the extension

case to to

thecollaborate

base use case.

Label the

line with

language

that

applies

to

a

multitude

of

different

systems.

Essentially,

it

enables

you

to

the keyword extend.Figure 7-15 shows an example of use case extension.

communicate solutions in a consistent, tool-supported language.

Today, UML has become the standard method for modeling software systems, which means

you're probably confronting this rich and expressive language more than ever before. And

Figure 7-15. Use case extension

even though you may not write UML diagrams yourself, you'll still need to interpret

diagrams written by others.

UML 2.0 in a Nutshell from O'Reilly feels your pain. It's been crafted for professionals like

you who must read, create, and understand system artifacts expressed using UML.

Furthermore, it's been fully revised to cover version 2.0 of the language.

This comprehensive new edition not only provides a quick-reference to all UML 2.0 diagram

types, it also explains key concepts in a way that appeals to readers already familiar with

UML or object-oriented programming concepts.

Topics include:

To provide more detail you can specify where the new functionality plugs into the base use

The

role and an

value

of UML point

in projects

case by

specifying

extension

and a note attached to the dependency line. Optionally

you can specify under what condition the extension executes, such as applicants > 1.Figure

The object-oriented paradigm and its relation to the UML

7-16 shows use case extension with a note specifying the extension point and the condition to

execute

extra functionality.

Anthe

integrated

approach to UML diagrams



Class and Object, Use Case, Sequence, Collaboration, Statechart, Activity, Component,

and Deployment Diagrams



Figure 7-16. Use case extension showing conditions in a note

Extension Mechanisms

The Object Constraint Language (OCL)



If you're new to UML, a tutorial with realistic examples has even been included to help you

quickly familiarize yourself with the system.



Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Chapter 7.  Use Case Diagrams

Tải bản đầy đủ ngay(0 tr)

×