You are on page 1of 9

Universitt Stuttgart

Institute of Industrial Automation and Software Engineering


Prof. Dr.-Ing. Dr. h. c. P. Ghner

Exercises Software Engineering


for Real-Time Systems
Exercise 8: Use Case Analysis

Introduction

2004 IAS, Universitt Stuttgart

Definition - Use Case


A Use Case consists of several related tasks performed by an actor aiming to
reach a desired goal or to create a desired result resp.

Use Case in a Information System


Sequence of related transactions performed by an actor interacting with a
system aiming to get a result with a measurable value
All the use cases document all the possibilities to make use of a system
(Use Case Model)

Aims of Use Cases


Specification of event-oriented work flows when using the software to be
developed
2004 IAS, Universitt Stuttgart

What is an actor?
Role figured by a user of the system
Often a person
May also be an organisation unit or some other system
Is always located outside the system
The Actor has an influence on the system

Notation Actor

Actor 1

Actor 2

2004 IAS, Universitt Stuttgart

Use Case Template


Use Case:
Goal:
Category:

<Name of the use case>


<Final aim of the use case assuming successful completion>
<primay
| secondary
| optional

(required, frequently needed)


(required, rarely needed)
(useful, needed just in case)>

Precondition:
<state at the start of the use case>
Postcondition Success: <expected state at normal termination of the use case>
Postcondition Failure: <state after the use case has terminated due to an error>
Actors:
<actors involved in the use case>
Triggering Event:
<event that needs to occur in order to start the use case>
Description:
< Description of the default behavior>
1 <First action>
2 <Second action>
Extensions:
1a <Extension to the first action>
Alternatives:
1a <Alternative to the first action>
2004 IAS, Universitt Stuttgart

Use Case Diagram


Notation
System
GeschftsUse Case 1
proze1
Actor 1
Akteur1

Akteur3
Actor 3
GeschftsUse Case 2
proze2

GeschftsUse Case 3
proze3

Actor 2
Akteur2

Overview of relationships between actors and use


cases
2004 IAS, Universitt Stuttgart

Relationships in Use Case Diagrams


-

Extends Relation

Process Order

<<extends>>

Process
subsequent
delivery

Extension to an
existing use case

Includes Relation
Post Invoice

<<includes>>

Sell Product

<<includes>>

Separation of a behavior
that multiple use cases
have in common

Sell Service

Extends and Includes relations avoid redundant use cases


2004 IAS, Universitt Stuttgart

Definition - Scenario
A Scenario is a sequence of processing steps to be executed under dedicated
circumstances.
-

The processing steps have to realize the actors main goal and provide a
complying result
Scenarios begin with a triggering event and are continued up to the
moment where the goal is reached or abandoned

Scenarios are represented by Interaction Diagrams


UML provides two kinds of interaction diagrams:
Sequence Diagram
Collaboration Diagram (outside the scope of this introduction)

2004 IAS, Universitt Stuttgart

Notation - Sequence Diagram


Akteur
Actor

Object is
Objekt
created
wird
erzeugt
op()

:C3

:C2

ObjektObject
linie
Line

:C1

Botschaft
Message

op1()

op2()
op3()

Objekt
Object
wirdis
gelscht
destroyed

2004 IAS, Universitt Stuttgart

Sequence Diagram

Two dimensions
The vertical axis represents the time
On the horizontal axis the objects are arranged

Each object is represented by


an object symbol
a vertical dashed line (Object Linie)

Condition
[<Condition>] Operation()

Iteration
*Operation()* or [<Condition>] Operation()

2004 IAS, Universitt Stuttgart

You might also like