You are on page 1of 11

Review Exercise

Draw a class diagram showing the relationship


to
the following:
The textbooks contain several objects including
cover, table of contents, chapter and
index
chapter.
Furthermore, the chapter object contains page
objects, which in turn contain paragraph
objects
Slide 14 (of 24)
which in turn contain word object.

Use Case Modeling: Core


Elements
Construct Description
use case

actor

A sequence of actions, including


variants, that a system (or other
entity) can perform, interacting with
actors of the system.
A coherent set of roles that users
of use cases play when interacting
with these use cases.

Syntax
U seC aseN am e

A c to rN a m e

system
boundary

Slide 17 (of 32)

Represents the boundary between


the physical system and the actors
who interact with the physical
system.

Use Case Modeling: Core


Relationships
Construct

Description

The participation of an actor in a use


case. i.e., instance of an actor and
instances of a use case communicate
with each other.
extend
A relationship from an extension use
case to a base use case, specifying
how the behavior for the extension
use case can be inserted into the
behavior defined for the base use
case.
generalization A taxonomic relationship between a
more general use case and a more
specific use case.

Syntax

association

Slide 18 (of 32)

<<extend>>

Use Case Diagram


Set Limits
Manager

Update
Accounts

Analyse Risk

<<include>>
<<include>> Valuation
Negotiate Price
Client

Actor

Capture Deal
SalesPerson
<<extend>>

Use case

Slide 20 (of 32)

Limits Exceeded

The Extend Relationship


Two types of links exist between actors and
use cases
Use the Extends Relationship when one use case is
similar to another use case,but it does a bit more.
E.g. Use Case - Capture Deal this will occur if the
negotiation goes smoothly. However, if the
maximum limit assigned to that particular client is
exceeded we will carry out a variation on the
behaviour.
This variation in the behaviour will be plotted
elsewhere to avoid complicating the normal use
case.

Slide 22 (of 32)

Identifying an Extend
Relationship
Capture the simple, normal use case first
For each step ask what could go wrong here?
and How might this work differently?
Identify the variations as extensions of the
given use case.
Update
Resource Manager

Resource
<<extend>>
<<extend>>
Unassign
Assign
skill

Slide 23 (of 32)

skill

The Include Relationship


This relationship occurs when there is
behaviour that is similar across more than one
use case.
E.g. Both Analyse Risk and Negotiate Price
require a valuation of the deal. Therefore a
separate Valuation Use case is referred to
Analyse Risk
<<include>>
from the original use cases.
<<include>>
Negotiate Price

Slide 25 (of 32)

Valuation

Example of a Include
Relationship
Add Skill
Resource Manager

<<include
Remove >>
Find Skill
skill
Update
skill

<<include>>

Resource managers may add, remove or update skills information.


As a skill needs to be found before it can be removed or updated
a find skill use case is utilised.
Slide 26 (of 32)

Another Example of Use Case


Diagram

Slide 27 (of 32)

Use Case Description

Written in Natural Language


Name
Participating actors
Entry condition
Flow of events
Exit condition
Special Requirement

Slide 28 (of 32)

Use Case Description: Change


Flight

Actors: traveler, client account db, airline reservation system


Preconditions:

Traveler has logged on to the system and selected change


flight itinerary option
Basic course

System retrieves travelers account and flight itinerary from


client account database

System asks traveler to select itinerary segment she wants to


change; traveler selects itinerary segment.

System asks traveler for new departure and destination


information; traveler provides information.

If flights are available then

System displays transaction summary.


Alternative courses

If no flights are available then

Slide 29 (of 32)

You might also like