You are on page 1of 9

1

Universitt Stuttgart
Institute of Industrial Automation and Software Engineering
Prof. Dr.-Ing. Dr. h. c. P. Ghner
2004 IAS, Universitt Stuttgart
Exercises Software Engineering
for Real-Time Systems
Introduction
Exercise 8: Use Case Analysis
2
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.
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)
Use Case in a Information System
Specification of event-oriented work flows when using the software to be
developed
Aims of Use Cases
3
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
4
2004 IAS, Universitt Stuttgart
Use Case Template
Use Case: <Name of the use case>
Goal: <Final aim of the use case assuming successful completion>
Category: <primay (required, frequently needed)
| secondary (required, rarely needed)
| optional (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>
5
2004 IAS, Universitt Stuttgart
Use Case Diagram
Overview of relationships between actors and use
cases
System
Geschfts-
proze2
Geschfts-
proze3
Geschfts-
proze1
Akteur3
Akteur1
Akteur2
Use Case 1
Use Case 2 Use Case 3
Notation
Actor 1
Actor 2
Actor 3
6
2004 IAS, Universitt Stuttgart
Relationships in Use Case Diagrams
Extends and Includes relations avoid redundant use cases
- Includes Relation
- Extends Relation
Extension to an
existing use case
Separation of a behavior
that multiple use cases
have in common
Post Invoice
Sell Service
<<includes>>
<<includes>>
Process
subsequent
delivery
Process Order
<<extends>>
Sell Product
7
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)
8
2004 IAS, Universitt Stuttgart
Notation - Sequence Diagram
Akteur
Objekt
wird erzeugt
op()
Objekt
wird
gelscht
op2()
:C2 :C3
op1()
op3()
Botschaft
Objekt-
linie
:C1
Actor
Object is
created
Object
is
destroyed
Object
Line
Message
9
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()

You might also like