Behaviour - PowerPoint PPT Presentation

1 / 20
About This Presentation
Title:

Behaviour

Description:

Behavioural must be consistent with structure check consistence. 17. MED4 Software design ... Consistence between event table and state chart diagram ... – PowerPoint PPT presentation

Number of Views:64
Avg rating:3.0/5.0
Slides: 21
Provided by: peteraxe
Category:

less

Transcript and Presenter's Notes

Title: Behaviour


1
Behaviour
  • Overview, principles techniques
  • Chapter 5

2
Problem domain analysis Chapter 5
Behaviour activity
A systems fundamental purpose is to register,
store and produce information about problem
domain events
What happens in the problem domain over time,
typically there is limitations on event order
Behaviour chapter 5 purpose Add description
of the behavioural pattern and attributes on each
class RESULT State chart diagram
3
Problem domain analysis Chapter 5
State chart Diagram
Behavioural pattern A description of possible
event traces for all objects in a class
A sequence of events involving a specific
object
Attribute a descriptive property of a class or
an event
4
Problem domain analysis Chapter 5
Statechart Diagram
Initial state
State
Final state
Transition with events and attributes
5
Problem domain analysis Chapter 5
Control structures in statechart
diagrams Graphical notation
An event occurs zero or more times
Exactly one out of a set of events occurs
Events in a set occur one by one
Sequence
Selection
Iteration
T
T
a
a
b
z
a
T
1
a
b
z
b
T
T
1
2
c
T
2
z
6
Control structures in state chart
diagrams Regular expression
Sequence Selection Iteration

Account opened (amount deposited amount
withdrawn) Account closed
Disadvantages Difficult to maintain a good
overview No name of the states of an object
7
Problem domain analysis Chapter 5
Conditions in state chart diagrams
Notation
(date)
(date)
8
Problem domain analysis Chapter 5
Activities in behavioural
9
Problem domain analysis Chapter 5
Describe behavioural patterns
  • For each class we ask
  • Which events cause the creation of a
    problem-domain object? These events are grouped
    as selections that can cause the birth of an
    object.
  • Which events cause the disappearance of a
    problem-domain object? These events are grouped
    as selections that can cause the death of an
    object.
  • Life between birth and death
  • Is the overall form structured or unstructured?
  • Which events occur together in a sequence?
  • Are there any alternative events?
  • Can a given event occur more than once?

10
Problem domain analysis Chapter 5
Sufficient, But simple The behavioural pattern
should be sufficiently precise to describe all
legal, and thus all illegal, event traces
Account opened (date)
11
Problem domain analysis Chapter 5
Sufficient, But simple The behavioural pattern
should provide an overview and thus be as simple
as possible
S State with sub states
12
Problem domain analysis Chapter 5
Maintain overview Consistence between event
table and state chart diagram
indicates that the event in question can occur
zero or one time Indicates it can occur zero or
more times
13
Problem domain analysis Chapter 5
Explore Patterns The Stepwise Relation Pattern
Relevant when certain problem-domain objects are
related to the elements of a hierarchy
14
Problem domain analysis Chapter 5
Explore Patterns The Stepwise Role Pattern
Relevant to describe how the behavioural of a
whole changes as its part become active
15
Problem domain analysis Chapter 5
Explore Patterns The Composite Pattern
Relevant when having a recursive description
(like Bill of material)
16
Problem domain analysis Chapter 5
Consider Structures Behavioural must be
consistent with structure check consistence
  • Aggregation and association
  • If two or more objects have common events,
    consider adding an aggregation or association
    structure between them.
  • If two classes are related by an aggregation or
    association structure, at least one common event
    should be considered.
  • Generalization
  • If the same event is tied to two classes,
    consider whether one class is a generalization of
    the other.
  • If two classes have many events with the same
    name, consider whether they are different
    specializations of a third class

17
Problem domain analysis Chapter 5
Consider Classes
account
account
Customer
opened
closed
name
address
account
account
closed
opened
Active
Relevant to create new classes Here account
in order to avoid illegal events (close an
account before it is opened)
1
amount
amount
withdrawn
deposited
1..

Account
account
balance
opened
(date)
account closed
(date)
Open
amount
amount
withdrawn
deposited
18
Problem domain analysis Chapter 5
Describe Attributes Descriptive overall property
of a class or event
19
Problem domain analysis Chapter 5
Describe Attributes Descriptive overall property
of a class or event
  • Class attributes
  • What are the general characteristics of the
    class?
  • How is the class described in the problem domain?
  • What basic data must be captured about objects
    from this class?
  • What results from an event trace must be captured?
  • Event attributes
  • What time did the event occur?
  • Which amount did it concern?

20
Problem domain analysis Chapter 5
Behavioural activity Results
A behavioural pattern with attributes for every
class in a class diagram The behavioural pattern
describes legal event for each object in the class
Consistence between event table and state chart
diagram Consistence between structures and state
chart diag ram
Write a Comment
User Comments (0)
About PowerShow.com