• No results found

The main concepts for object approaches and UML

N/A
N/A
Protected

Academic year: 2021

Share "The main concepts for object approaches and UML"

Copied!
14
0
0

Loading.... (view fulltext now)

Full text

(1)

The main concepts for object

approaches and UML

UML - P. Bommel, J.P. Müller, M. Belem1

approaches and UML

Part 2 :

Part 2 :

The dynamical models

The dynamical models

The dynamical models

The dynamical models

·

To understand and describe the behaviours of the

objects and their interactions

·

Three types of representations

¾

State chart diagrams

(internal dynamics)

¾

Activity diagrams

(intra and inter object dynamics)

¾

Interaction diagrams

(interaction dynamics)

Sequence diagrams

(2)

Content

Content

·

State chart diagrams

·

Activity diagrams

·

Interaction diagrams

UML - P. Bommel, J.P. Müller, M. Belem3

¾

Sequence diagrams

¾

Collaboration diagrams

·

Conclusion

Content

Content

·

State chart diagrams

·

Activity diagrams

·

Interaction diagrams

¾Sequence diagrams ¾Collaboration diagrams

(3)

State chart diagrams

State chart diagrams

·

Objective :

¾

To describe the life cycle of an object

¾

To describe the life cycle of an object

·

Elements :

¾

State of an object

• Values of its attributes and links

• An object change its state over time

¾

Transition

UML - P. Bommel, J.P. Müller, M. Belem5

¾

Transition

• Events (action of an object onto another)

• Guard (conditions)

• Actions

State chart diagrams

State chart diagrams

Un état

A state

·

A transition is due to an event

Etat

initial Transitions Etat final

Event 1 [Cond1] / Action1

Initial

state Transitions Finalstate

State 1

do : Activity 1

Event 1 [Cond1] / Action1

State 2

faire : Activity 2

(4)

Examples

Examples

·

Heater

State : stop T° < 15°C State : heat

·

Life cycle

actif changement de travail limite d'âge active age limit work change

UML - P. Bommel, J.P. Müller, M. Belem7

en formation chomeur retraite embauche reconversion g limite d'âge embauche licenciem ent retired unemployed formation hire hire fire g age limit conversion

Example: plot

Example: plot

(5)

The actions

The actions

·

For the transitions

·

For the states

State A Event( arg1,... )[ condition ] / link.sendEvent(arg1, ...) State B

UML - P. Bommel, J.P. Müller, M. Belem9

Super states

Super states

·

États d’un feu tricolore

(6)

Parallelism

Parallelism

·

T and U in parallel

·

Event E1 dispatched to T and U

·

Event E1 dispatched to T and U

S T X U V T X X U V V

UML - P. Bommel, J.P. Müller, M. Belem11

X Y Z W X Y Z X Y E1 Z E2 E3 W W E4[ in Z ] E1

Content

Content

·

State chart diagrams

·

Activity diagrams

·

Interaction diagrams

¾Sequence diagrams ¾Collaboration diagrams

(7)

Activity diagrams

Activity diagrams

·

Objective:

¾

To describe the activities and their ordering

¾

To describe the activities and their ordering

·

Can be used for

¾

the internal behaviour of an object

¾

the concrete functioning of a behaviour

¾

the control ordering between activities spread among a set

of objects

UML - P. Bommel, J.P. Müller, M. Belem13

of objects

Activity diagrams the elements

Activity diagrams the elements

·

Activities

O d

b t

ti iti

activity

·

Order between activities

¾

En fait ces diagrammes peuvent être vus comme une forme simplifiée

des diagrammes d'états - transitions

activity

state1 event

·

Initial and final pseudo activities

·

Decision and synchronisation points

(8)

Notations

Notations

·

An activity is an action

Un état

An activity

·

A link is a sequencing of activities

Etat initial Etat final Transitions An activity Initial

time Transitions Finaltime

UML - P. Bommel, J.P. Müller, M. Belem15

Activity diagram: life cycle

Activity diagram: life cycle

naître

croître

se reproduire

(9)

Other notations

Other notations

activ-1 activ-2 decision point activ-3 [ condition-1 ] activ-5 activ-6 activ-4 [ condition-2 ] synchronisation point

UML - P. Bommel, J.P. Müller, M. Belem17

activ-7 activ-8 synchronisation points

The swimlanes

The swimlanes

activ-1 Ne wSwim lane3 Ne wSwim lane2 NewSwim lane activ-3 activ-2 activ-6 [ condition-1 ] activ-4 [ condition-2 ] QuickTime™ et un décompresseur TIFF (LZW) sont requis pour visionner cette image.

activ-5 activ-6 activ-7

(10)

Example: farmer activities

Example: farmer activities

UML - P. Bommel, J.P. Müller, M. Belem19

Content

Content

·

State chart diagrams

·

Activity diagrams

·

Interaction diagrams

¾Sequence diagrams

¾Collaboration diagrams

(11)

Sequence diagrams

Sequence diagrams

:B :C :A M1 M2 M3 M4

UML - P. Bommel, J.P. Müller, M. Belem21

M6 M5

Collaboration diagrams

Collaboration diagrams

:B :C :A 1: M1 2: M2 4: M4 6: M6 5: M5 message 3: M3

(12)

The life line

« create »

Sequence diagrams

Sequence diagrams

Creation by an external object

Activation of an object Receiving the event « op »

:C1 op

UML - P. Bommel, J.P. Müller, M. Belem23

Deletion by an external object

« destroy »

Sequence diagrams

Sequence diagrams

·

Interaction types

¾synchronous: ¾asynchronous: ¾reflexive: ¾constructive: ¾destructive: :Ca ¾destructive: ¾alternative:

[X]mess.

[non X]mess.

(13)

Content

Content

·

State chart diagrams

·

Activity diagrams

·

Interaction diagrams

¾Sequence diagrams

UML - P. Bommel, J.P. Müller, M. Belem25

¾Collaboration diagrams

·

Conclusion

·

A tool for dialog :

¾

A language to represent models

UML: Conclusion

UML: Conclusion

¾

A language to represent models

¾

Graphical and simple

¾

Formal and nomalized (OMG)

·

An open tool

¾

Independent of the implementation

¾

Independent of the implementation

¾

It is a language, not a process

(14)

UML books (1)

UML books (1)

·

Booch Grady, Rumbaugh James, and Jacobson Ivar,

The Unified Modeling Language User Guide, 0-201-57168-

g

g g

,

4, Addison Wesley, Fall 1998,

·

Jacobson Ivar, Booch Grady and Rumbaugh James, The

Unified Software Development Process, 0-201-57169-2,

Addison Wesley, Fall 1998,

·

Rumbaugh James Jacobson Ivar and Booch Grady The

UML - P. Bommel, J.P. Müller, M. Belem27

·

Rumbaugh James, Jacobson Ivar, and Booch Grady, The

Unified Modeling Language Reference Manual,

0-201-30998-X, Addison Wesley, Fall 1998

UML books (2)

UML books (2)

¾Conallen Jim, Concevoir des applications Web avec UML, Eyrolles , 2000.

¾Douglass Bruce Powell, Doing Hard Time : Developping Real-Time Systems with

UML, Addison Wesley, 1999.

¾Eriksson , UML Toolkit, Wiley, 1997

¾Fowler Martin, UML Distilled, Applying the Standard Object Modeling Language Addison Wesley, 1997

¾Kettany N et al, De Merise à UML,Eyrolles , 1998

¾Larman Craig, Applying UML and Patterns,Prentice Hall, 1998

¾Lee R, Tepfenhart W, UML et C++, Simon et Schuste , 1998

¾Lopez N, Intégrer UML dans vos projets, Eyrolles, 1997p g p j y

¾Muller Pierre-Alain, Modélisation objet avec UML, Eyrolles, 1997

¾Roques Pascal, Vallée Franck, UML en action, Eyrolles, 2000.

¾Roques Pascal, UML par la pratique, Eyrolles, 2001.

References

Related documents

modern literature By decade •• List of years in literature Early modern by century •• 16th •• 17th 20th–21st century •• Modernism •• Structuralism ••

Given the prominent role of L-type VDCCs in Mch-induced sustained contraction in mouse airways, and our and others’ findings that bitter tastants reverse Mch-induced

The ordinance incentivizes the retrofit of vehicles-for-hire to wheelchair accessible vehicles by extending the vehicle age limit for vehicles used as wheelchair accessible

Having control over the billing cycle is important to many physicians and practice managers, whether billing is managed in-house or by an outside billing service1. If you use

The audit of the SACSA framework for the middle years found that all learning areas have distinctive numeracy demands in relation to mathematical knowledge, contexts,

The Executive 2015 Capital Commitment Plan includes $285.4 million in Fiscal 2014-2018 for the Human Resources Administration (including City and Non-City funds). The

In Chapter 7, we show that checking whether the sequence of NDL graph edits specified by an LA edit pair sequence of length at most ` can be performed in a given input graph is in

In the current study, we performed the targeted sequenc- ing of 27 genes reported to cause monogenic diabetes in suspected Tunisian MODY patients in order to detect the