+ All Categories
Home > Documents > TTool Training I. Introduction to UML - [email protected]...

TTool Training I. Introduction to UML - [email protected]...

Date post: 28-Feb-2020
Category:
Upload: others
View: 0 times
Download: 0 times
Share this document with a friend
49
TTool Training I. Introduction to UML Ludovic Apvrille – TTool Training - 2004. Slide #1 I. Introduction to UML Ludovic Apvrille [email protected] Eurecom, Office 223
Transcript
Page 1: TTool Training I. Introduction to UML - ttool.telecom-paris.frludovic.apvrille@telecom-paris.fr Eurecom, Office 223. Outline of the Training Introduction to UML Modeling with UML Main

TTool Training

I. Introduction to UML

Ludovic Apvrille – TTool Training - 2004. Slide #1

I. Introduction to UML

Ludovic [email protected]

Eurecom, Office 223

Page 2: TTool Training I. Introduction to UML - ttool.telecom-paris.frludovic.apvrille@telecom-paris.fr Eurecom, Office 223. Outline of the Training Introduction to UML Modeling with UML Main

Outline of the Training

� Introduction to UML� Modeling with UML� Main diagrams for embedded systems and protocols

� The TURTLE profile� Design with TURTLE

Ludovic Apvrille – TTool Training - 2004. Slide #2

� Design with TURTLE� Analysis with TURTLE

� The TURTLE Toolkit (TTool)� Exercises

� Special thanks to Pierre de Saqui-Sannes who actively participated in the elaboration of these slides

Page 3: TTool Training I. Introduction to UML - ttool.telecom-paris.frludovic.apvrille@telecom-paris.fr Eurecom, Office 223. Outline of the Training Introduction to UML Modeling with UML Main

I. Introduction to UML

� Introduction to modeling�OMG�UML 1.5 and UML 2.0�UML for embedded systems and protocols

Ludovic Apvrille – TTool Training - 2004. Slide #3

�UML for embedded systems and protocols�Objects in a nutshell�Analysis with UML�Design with UML�Detailed design with UML

Page 4: TTool Training I. Introduction to UML - ttool.telecom-paris.frludovic.apvrille@telecom-paris.fr Eurecom, Office 223. Outline of the Training Introduction to UML Modeling with UML Main

What is UML?

�UML = Unified Modeling Language

�Main characteristics of UML�Graphical modeling language for complex systems

Ludovic Apvrille – TTool Training - 2004. Slide #4

Graphical modeling language for complex systems� Specification, design, automatic code generation, documentation� Independent of any programming language

�Object-oriented design�Supported by many CASE Tools

� CASE = Computer-Aided Software Engineering

�Warning: no standard UML methodology

Page 5: TTool Training I. Introduction to UML - ttool.telecom-paris.frludovic.apvrille@telecom-paris.fr Eurecom, Office 223. Outline of the Training Introduction to UML Modeling with UML Main

A Few Questions …

� What is graphical modeling?

� Where does UML come from?

� Why should engineers use UML?

Ludovic Apvrille – TTool Training - 2004. Slide #5

� Why should engineers use UML?

� Is the use of UML relevant for embedded systems / real-time systems?

Page 6: TTool Training I. Introduction to UML - ttool.telecom-paris.frludovic.apvrille@telecom-paris.fr Eurecom, Office 223. Outline of the Training Introduction to UML Modeling with UML Main

� A modeling = an abstraction of the system to design� Representation of the main functionalities of a complex system� Non relevant details are ignored

� Abstractions make it possible to deal with complexity

What is Modeling?

Ludovic Apvrille – TTool Training - 2004. Slide #6

� An engineer, or a development team, cannot have a global understanding of complex systems

� A modeling is a view of a system according to some assumptions

Page 7: TTool Training I. Introduction to UML - ttool.telecom-paris.frludovic.apvrille@telecom-paris.fr Eurecom, Office 223. Outline of the Training Introduction to UML Modeling with UML Main

� Architects� Tailors� Statisticians� Engineers

Who Uses Modeling?

Ludovic Apvrille – TTool Training - 2004. Slide #7

� Engineers� Mechanics, Mechanics of fluid,� Protocols, � Electronic, microelectronic

� No exception for software!� And more particularly, for embedded systems

Page 8: TTool Training I. Introduction to UML - ttool.telecom-paris.frludovic.apvrille@telecom-paris.fr Eurecom, Office 223. Outline of the Training Introduction to UML Modeling with UML Main

Why Use UML for Modeling?

� Standard notation� Known by a growing number of people� Supported by matured tools

� Best understanding of systems by� Clients, experts of the domain, designers, programmers

Ludovic Apvrille – TTool Training - 2004. Slide #8

� Clients, experts of the domain, designers, programmers

� Support of engineering work� Abstract view of the system� Life cycle

� Focused on first steps: requirement analysis, design� Simulation, automatic generation of code (ADA, C, Java, C++, etc.)� Documentation� Maintenance, revision

� Reuse

Page 9: TTool Training I. Introduction to UML - ttool.telecom-paris.frludovic.apvrille@telecom-paris.fr Eurecom, Office 223. Outline of the Training Introduction to UML Modeling with UML Main

� UML gathers best practices of software engineering

� Modeling of complex (and software-based) systems

OMG (Object Management Group) standard

Gathering on UML

Ludovic Apvrille – TTool Training - 2004. Slide #9

� OMG (Object Management Group) standard� The reference� http://www.uml.org� A notation

� Box semantics

� 12 diagrams for expressing complementary point of views

Page 10: TTool Training I. Introduction to UML - ttool.telecom-paris.frludovic.apvrille@telecom-paris.fr Eurecom, Office 223. Outline of the Training Introduction to UML Modeling with UML Main

� A notation� Semantics?

� Metamodel� No formal semantics

� No methodologyProcess suggested by UML tool dealers

Gathering on UML (Cont.)

Ludovic Apvrille – TTool Training - 2004. Slide #10

� Process suggested by UML tool dealers– Unified process

• RUP – Rational Unified Process

� Extension capabilities� Profiles

Page 11: TTool Training I. Introduction to UML - ttool.telecom-paris.frludovic.apvrille@telecom-paris.fr Eurecom, Office 223. Outline of the Training Introduction to UML Modeling with UML Main

UML Views and Diagrams

�A view describes a statistical or a dynamical aspect of the system

�For each view�Several diagrams are available�Example: interactions between objects

Ludovic Apvrille – TTool Training - 2004. Slide #11

�Example: interactions between objects� Sequence diagrams� Collaboration diagrams

�Components of views�Classes, ports, interfaces, actors, messages, etc.

�Mechanisms for extending diagrams�Stereotypes, notes, constraints

Page 12: TTool Training I. Introduction to UML - ttool.telecom-paris.frludovic.apvrille@telecom-paris.fr Eurecom, Office 223. Outline of the Training Introduction to UML Modeling with UML Main

I. Introduction to UML

� Introduction to modeling�OMG�UML 1.5 and UML 2.0�UML for embedded systems and protocols

Ludovic Apvrille – TTool Training - 2004. Slide #12

�UML for embedded systems and protocols

Page 13: TTool Training I. Introduction to UML - ttool.telecom-paris.frludovic.apvrille@telecom-paris.fr Eurecom, Office 223. Outline of the Training Introduction to UML Modeling with UML Main

Origin of UML

Booch

OdellClassification Meyer

Pre- and post- conditions

Jacobson

Rumbaugh

Ludovic Apvrille – TTool Training - 2004. Slide #13

UMLShlaer-MellorObject life cycles

EmblySingleton classes

Gamma et al.Frameworks, patterns, notes

FusionOperation descriptionsMessage numbering

Wirfs-BrockResponsibilities

HarelState charts

Page 14: TTool Training I. Introduction to UML - ttool.telecom-paris.frludovic.apvrille@telecom-paris.fr Eurecom, Office 223. Outline of the Training Introduction to UML Modeling with UML Main

The OMG

�Object Management Group�Non-profit organization�Goal: definition of standards related to object-oriented

services

Ludovic Apvrille – TTool Training - 2004. Slide #14

�MOF, UML, XMI, CWM, CORBA (includes IDL, IIOP)

�Chronology�1989: 11 creating members�Nowadays, more than 800 members�Members have more or less important vote weight

Page 15: TTool Training I. Introduction to UML - ttool.telecom-paris.frludovic.apvrille@telecom-paris.fr Eurecom, Office 223. Outline of the Training Introduction to UML Modeling with UML Main

I. Introduction to UML

� Introduction to modeling�OMG�UML 1.5 and UML 2.0�UML for embedded systems and protocols

Ludovic Apvrille – TTool Training - 2004. Slide #15

�UML for embedded systems and protocols

Page 16: TTool Training I. Introduction to UML - ttool.telecom-paris.frludovic.apvrille@telecom-paris.fr Eurecom, Office 223. Outline of the Training Introduction to UML Modeling with UML Main

Towards UML 2.0

OMT

ROOM

MSC & SDLUML2.0

August 2003

Ludovic Apvrille – TTool Training - 2004. Slide #16

OMT (Rumbaugh et al.)

Booch

OOSE(Jacobson et al.)

UML0.9

1996

UML1.1

Nov. 1997

UML1.5

2002

Statecharts

Page 17: TTool Training I. Introduction to UML - ttool.telecom-paris.frludovic.apvrille@telecom-paris.fr Eurecom, Office 223. Outline of the Training Introduction to UML Modeling with UML Main

From UML 1.5 to UML 2.01. Use Case diagram2. Class diagram3. Object diagram4. Statechart diagram5. Activity diagram6. Sequence diagram

1. Class diagram2. Use case diagram3. Object diagram4. State machine diagram5. Activity diagram6. Sequence diagram

renamed

renamed

Ludovic Apvrille – TTool Training - 2004. Slide #17

6. Sequence diagram7. Collaboration diagram8. Component diagram9. Deployment diagram

6. Sequence diagram7. Communication diagram8. Component diagram9. Deployment diagram10. Composite structure diagram11. Interaction overview diagram12. Timing diagram13. Package diagram

renamed

newnewnewnew

Page 18: TTool Training I. Introduction to UML - ttool.telecom-paris.frludovic.apvrille@telecom-paris.fr Eurecom, Office 223. Outline of the Training Introduction to UML Modeling with UML Main

Overview

::

::

<<usecase>>

<<usecase>>

<<usecase>>

<<usecase>>

<<usecase>>

<<usecase>>

::<<include>><<include>>

m1m2

Ludovic Apvrille – TTool Training - 2004. Slide #18

Class1

Class1

Class2

Class2

Class3

Class3

Class4

Class4

Class5

Class5

p3:Class3

p3:Class3

p5:Class5

p5:Class5C

C

Page 19: TTool Training I. Introduction to UML - ttool.telecom-paris.frludovic.apvrille@telecom-paris.fr Eurecom, Office 223. Outline of the Training Introduction to UML Modeling with UML Main

I. Introduction

� Introduction to modeling�OMG�UML 1.5 and UML 2.0�UML for embedded systems and protocols

Ludovic Apvrille – TTool Training - 2004. Slide #19

�UML for embedded systems and protocols

Page 20: TTool Training I. Introduction to UML - ttool.telecom-paris.frludovic.apvrille@telecom-paris.fr Eurecom, Office 223. Outline of the Training Introduction to UML Modeling with UML Main

UML for Embedded Systems

� Specificity of embedded systems and protocols� Strict constraints

� Performance constraints, real-time constraints, etc.� Critical aspect

� Limited resources� Interactions between components

Ludovic Apvrille – TTool Training - 2004. Slide #20

� Specific UML methodology� Make use of some UML diagrams rather than others� Make use of simulation techniques as soon as possible in the development

cycle� Critical systems

� Specific UML toolkits� Profiles

Page 21: TTool Training I. Introduction to UML - ttool.telecom-paris.frludovic.apvrille@telecom-paris.fr Eurecom, Office 223. Outline of the Training Introduction to UML Modeling with UML Main

A UML Methodology Focused on Embedded Systems and Protocols

Detailed designBehavior of the system

Validation of the systemSimulation

Code generation

Ludovic Apvrille – TTool Training - 2004. Slide #21

AnalysisUse case

First class diagramRelevant scenarios

DesignClasses of the system

Architecture of the system

Page 22: TTool Training I. Introduction to UML - ttool.telecom-paris.frludovic.apvrille@telecom-paris.fr Eurecom, Office 223. Outline of the Training Introduction to UML Modeling with UML Main

Analysis Stage

� Purpose� Analysis of the requirements of the system

� Steps� Identification of use cases of the systems, and structuring of these cases

� Use case diagram

Ludovic Apvrille – TTool Training - 2004. Slide #22

� First scenarios emphasizing exchanges between actors of the system and the system itself

� Sequence diagram

� Identification of the main classes of the system� Class diagram

� Refined Scenarios� Classes identified at previous step are introduced into previously performed scenarios� Sequence diagrams

Page 23: TTool Training I. Introduction to UML - ttool.telecom-paris.frludovic.apvrille@telecom-paris.fr Eurecom, Office 223. Outline of the Training Introduction to UML Modeling with UML Main

Design stage

� Purpose� Structure the system under the form of classes and relations among those

classes

� Steps� Identification of secondary classes

Class diagram

Ludovic Apvrille – TTool Training - 2004. Slide #23

� Class diagram

� Identification of relations between classes� Association, aggregation, specialization, etc.� Class diagram

� Modeling of class hierarchy� Class diagram / Composite structure diagram

� Modeling message exchange between classes� Class diagram / Composite structure diagram

Page 24: TTool Training I. Introduction to UML - ttool.telecom-paris.frludovic.apvrille@telecom-paris.fr Eurecom, Office 223. Outline of the Training Introduction to UML Modeling with UML Main

Detailed Design Stage

� Purpose� Describe the behavior of the system

� Steps� Description of classes behavior

� Signals, operations

Ludovic Apvrille – TTool Training - 2004. Slide #24

� Signals, operations� State machine diagram / Activity diagram

� Description of the system dynamics� Creation / destroy of instances� State machine diagram / Activity diagram

� Refinement of relations among classes� Specialization� Class diagram

Page 25: TTool Training I. Introduction to UML - ttool.telecom-paris.frludovic.apvrille@telecom-paris.fr Eurecom, Office 223. Outline of the Training Introduction to UML Modeling with UML Main

Validation Stage

� Purpose� Check that the behavior of the system corresponds to the

targeted one

� Steps� Simulation

Ludovic Apvrille – TTool Training - 2004. Slide #25

� Simulation� Validation of the modeling as soon as possible� Modeling made at analysis stage and design stages are compared� Use case diagrams, Sequence diagrams vs.class diagrams, composite

structure diagrams and state machine diagrams (or activity diagrams)

� Implementation� Automatic code generation

– C, C++, Java, Ada� Class diagrams, composite structure diagrams and state machine diagrams

(or activity diagrams)

Page 26: TTool Training I. Introduction to UML - ttool.telecom-paris.frludovic.apvrille@telecom-paris.fr Eurecom, Office 223. Outline of the Training Introduction to UML Modeling with UML Main

UML Diagrams for Embedded Systems and Protocols

1. Class diagram2. Use Case diagram3. Object diagram4. State machine diagram5. Activity diagram6. Sequence diagram

Ludovic Apvrille – TTool Training - 2004. Slide #26

6. Sequence diagram7. Communication diagram8. Component diagram9. Deployment diagram10. Composite structure diagram11. Interaction overview diagram12. Timing diagram13. Package diagram

Page 27: TTool Training I. Introduction to UML - ttool.telecom-paris.frludovic.apvrille@telecom-paris.fr Eurecom, Office 223. Outline of the Training Introduction to UML Modeling with UML Main

UML Toolkits for Embedded Systems

� Goal: edition of diagrams, animation, code generation

� TAU G2 � www.telelogic.com

� Rhapsody� www.ilogix.com

Ludovic Apvrille – TTool Training - 2004. Slide #27

� ARTiSAN Real-Time Studio� www.artisansw.com

� (ROSE-RT)� www.rational.com

� TTool!� www.eurecom.fr/~apvrille/TURTLE

Page 28: TTool Training I. Introduction to UML - ttool.telecom-paris.frludovic.apvrille@telecom-paris.fr Eurecom, Office 223. Outline of the Training Introduction to UML Modeling with UML Main

Books

�Michael Jesse Chonoles, James A. Schardt, “UML 2 for Dummies”, Wiley, 2003, ISBN 0-7645-2614-6

�Laurent Doldi, “UML 2 Illustrated - Developing Real-Time & Communications Systems”, TMSO , 2003, ISBN 2-9516600-1-4 http://perso.wanadoo.fr/doldi/sdl/umlbook.htm

Ludovic Apvrille – TTool Training - 2004. Slide #28

http://perso.wanadoo.fr/doldi/sdl/umlbook.htm�Tom Pender, “UML Bible”, John Wiley & Sons, 2003,

ISBN 0764526049 �Luciano Lavagno et al., “UML for Real: Design of

Embedded Real-Time Systems”, Kluwer Academic Publishers, ISBN 1-4020-7501-4

Page 29: TTool Training I. Introduction to UML - ttool.telecom-paris.frludovic.apvrille@telecom-paris.fr Eurecom, Office 223. Outline of the Training Introduction to UML Modeling with UML Main

Structured vs. Object-Oriented Programming

� Structured programming� = Imperative programming� Programs are structured into subprograms to manage complexity � Emphasizes functions

� But: data is what is most likely to be stable in the life of a program

Ludovic Apvrille – TTool Training - 2004. Slide #29

� But: data is what is most likely to be stable in the life of a program

� Object-oriented programming� First focused on data rather than on functions� A computer program is composed of a collection of individual units, or objects � Challenge of programmers: distribute responsibility over objects

Page 30: TTool Training I. Introduction to UML - ttool.telecom-paris.frludovic.apvrille@telecom-paris.fr Eurecom, Office 223. Outline of the Training Introduction to UML Modeling with UML Main

Fundamentals of Objects

� Object-oriented paradigm� A problem is addressed with object-oriented concepts

� An object is an abstraction of data themselves containing abstractions of functions

Ludovic Apvrille – TTool Training - 2004. Slide #30

containing abstractions of functions

� Objects exchange messages� They collaborate together to achieve predefined tasks

Page 31: TTool Training I. Introduction to UML - ttool.telecom-paris.frludovic.apvrille@telecom-paris.fr Eurecom, Office 223. Outline of the Training Introduction to UML Modeling with UML Main

Definitions

� Booch, Object-Oriented Design with Applications� An object is made of a state, a behaviorand of an identity� The terms “instance” and “object” are interchangeable

� Rumbaugh et al., Object-oriented Modeling and Design

Ludovic Apvrille – TTool Training - 2004. Slide #31

� Design, abstraction or “thing” whose frontiers and significations are very close to the addressed problem

� Jacobson, Object-oriented Software Engineering, a Use-Case Driven Approach� An object is en entity able to save a state(information) and that

offers a given number of operationsto consult this state or to modify it

Page 32: TTool Training I. Introduction to UML - ttool.telecom-paris.frludovic.apvrille@telecom-paris.fr Eurecom, Office 223. Outline of the Training Introduction to UML Modeling with UML Main

Examples of Objects

Ludovic’s last nameLudovic’s addressbrut Incomenet Incometaxable income

Ludovicnumbertitleauthorduration

Course on UML

Ludovic Apvrille – TTool Training - 2004. Slide #32

taxable income

flighNumberownerdepartureAirportarrivalAirport

Plane ticket for ParisPlane ticket for Moscow

state (on / off)switch

flighNumberownerdepartureAirportarrivalAirport

Page 33: TTool Training I. Introduction to UML - ttool.telecom-paris.frludovic.apvrille@telecom-paris.fr Eurecom, Office 223. Outline of the Training Introduction to UML Modeling with UML Main

Example of Objects and Messages

switch on switch off

state (on / off)switch

Ludovic Apvrille – TTool Training - 2004. Slide #33

print

flighNumberownerdepartureAirportarrivalAirport

Plane ticket for Paris Plane ticket for MoscowflighNumberownerdepartureAirportarrivalAirport

Page 34: TTool Training I. Introduction to UML - ttool.telecom-paris.frludovic.apvrille@telecom-paris.fr Eurecom, Office 223. Outline of the Training Introduction to UML Modeling with UML Main

States Characterized by Attributes

� The value of the attributes defines the state of the object� Static characteristics� Dynamic characteristics

Ludovic Apvrille – TTool Training - 2004. Slide #34

� Exercises� What are the attributes of a checking account?

� Issue of the access rights to attributes!

Page 35: TTool Training I. Introduction to UML - ttool.telecom-paris.frludovic.apvrille@telecom-paris.fr Eurecom, Office 223. Outline of the Training Introduction to UML Modeling with UML Main

A Behavior Based on Operations

� Operations are all possible actions on an object� A response from the object might be required

� An object O1 can communicate with an object O2 � Invocation of an operation of O2

Ludovic Apvrille – TTool Training - 2004. Slide #35

� Issue of the access rights to operations!

Page 36: TTool Training I. Introduction to UML - ttool.telecom-paris.frludovic.apvrille@telecom-paris.fr Eurecom, Office 223. Outline of the Training Introduction to UML Modeling with UML Main

Notion of Message

�One-way communication between two objects�Flow of control with information passed from the

sender to the receiver.�May have parameters that convey values

Ludovic Apvrille – TTool Training - 2004. Slide #36

�Can be �a signal�a call�a return�create�destroy

Page 37: TTool Training I. Introduction to UML - ttool.telecom-paris.frludovic.apvrille@telecom-paris.fr Eurecom, Office 223. Outline of the Training Introduction to UML Modeling with UML Main

Classes and Objects

� Same duality as “type” and “variable”� Class

� Unit that eases the definition of objects sharing common characteristics

� Attributes, operations

Ludovic Apvrille – TTool Training - 2004. Slide #37

� Attributes, operations

� Object� An entity of the real world built upon an abstract unit� Instance of a class

� Attributes and operations are defined in the corresponding class

� State of an object = value of its attribute at a given time� Behavior of an object = set of operations it can perform when

reacting from messages coming from other objects

Page 38: TTool Training I. Introduction to UML - ttool.telecom-paris.frludovic.apvrille@telecom-paris.fr Eurecom, Office 223. Outline of the Training Introduction to UML Modeling with UML Main

Example of Classes in UML

Name of the classUML Comment

BankAccount

-value : int

BankAccount

-value : int

A basic bank account has no granted overdraft A basic bank account has no granted overdraft

Ludovic Apvrille – TTool Training - 2004. Slide #38

List of attributes- : private

Liste of operations+ : public

-value : int-owner-amount

+credit(float)+debit(float)

-value : int-owner-amount

+credit(float)+debit(float)

granted overdraft or maximum deposit amountgranted overdraft or maximum deposit amount

Page 39: TTool Training I. Introduction to UML - ttool.telecom-paris.frludovic.apvrille@telecom-paris.fr Eurecom, Office 223. Outline of the Training Introduction to UML Modeling with UML Main

Attributes and Operations of Instances

� All instances of the same class have the same behavior� Operations

� Each instance has its own state

Ludovic Apvrille – TTool Training - 2004. Slide #39

� Attributes of the instance� Their value may be different for each instance

� Are global variables possible in the object-oriented paradigm?� Attributes common to all instances of a class

Page 40: TTool Training I. Introduction to UML - ttool.telecom-paris.frludovic.apvrille@telecom-paris.fr Eurecom, Office 223. Outline of the Training Introduction to UML Modeling with UML Main

Fundamentals of Object-Oriented Paradigm

� Modularity� The computer program is built entirely inside classes

� Encapsulation� Information hiding

No need to have a knowledge of the inside of a class to use it -> only the

Ludovic Apvrille – TTool Training - 2004. Slide #40

� No need to have a knowledge of the inside of a class to use it -> only the knowledge of its interface is required

� Abstraction� Objects: abstraction of the real world� Classes: abstraction of objects

� Reusability

Page 41: TTool Training I. Introduction to UML - ttool.telecom-paris.frludovic.apvrille@telecom-paris.fr Eurecom, Office 223. Outline of the Training Introduction to UML Modeling with UML Main

Interaction Overview Diagrams

Ludovic Apvrille – TTool Training - 2004. Slide #41

Page 42: TTool Training I. Introduction to UML - ttool.telecom-paris.frludovic.apvrille@telecom-paris.fr Eurecom, Office 223. Outline of the Training Introduction to UML Modeling with UML Main

UML Sequence Diagrams

� Basics of sequence diagrams� Gives clear visual clues to possible flows of control over time� Emphasizes time ordering� Shows object lifeline� Shows the focus of control

Ludovic Apvrille – TTool Training - 2004. Slide #42

� UML 1.5� Notion of message (or stimulus) and of lifeline� Observation of time� Temporal constraints� Activation of an object

� UML 2.0� Suspension, interaction, duration constraints

Page 43: TTool Training I. Introduction to UML - ttool.telecom-paris.frludovic.apvrille@telecom-paris.fr Eurecom, Office 223. Outline of the Training Introduction to UML Modeling with UML Main

Basic Syntax

Object3

Object3

Object2

Object2

Object1

Object1

message1 ()message1 ()

message2 ()message2 ()

Ludovic Apvrille – TTool Training - 2004. Slide #43

Time

Page 44: TTool Training I. Introduction to UML - ttool.telecom-paris.frludovic.apvrille@telecom-paris.fr Eurecom, Office 223. Outline of the Training Introduction to UML Modeling with UML Main

Basic Syntax (Cont.)

Object1

Object1

Object2

Object2

Object1

Object1

Object2

Object2

message1 ()message1 ()

message2 ()message2 () message2 ()message2 ()

message1 ()message1 ()

=

Ludovic Apvrille – TTool Training - 2004. Slide #44

message2 ()message2 () message2 ()message2 ()=

Page 45: TTool Training I. Introduction to UML - ttool.telecom-paris.frludovic.apvrille@telecom-paris.fr Eurecom, Office 223. Outline of the Training Introduction to UML Modeling with UML Main

Association

� Association name

� Association with navigability

Client Productpurchase

Ludovic Apvrille – TTool Training - 2004. Slide #45

� Association with navigability

Student

Student

University

UniversitystudyIn

studyIn

University

University

Student

Student

admits

admits

Page 46: TTool Training I. Introduction to UML - ttool.telecom-paris.frludovic.apvrille@telecom-paris.fr Eurecom, Office 223. Outline of the Training Introduction to UML Modeling with UML Main

Example: At Class Diagram Level

package example1Class Diagram {1/1}package example1Class Diagram {1/1}

<<interface>>

toCar

startCar ()stopCar ()gearUp()gearDown ()turnRight ()

<<interface>>

toCar

startCar ()stopCar ()gearUp()gearDown ()turnRight ()

<<interface>>

fromCar

failure(Integer)

<<interface>>

fromCar

failure(Integer)

Ludovic Apvrille – TTool Training - 2004. Slide #46

turnRight ()turnLeft ()turnRight ()turnLeft ()

CarSystem

CarSystem

Car

Car

Driver

Driver

c

1

c

1

d

1

d

1

p1p1

toCartoCar

fromCarfromCar

p2p2

fromCarfromCar toCartoCar

Page 47: TTool Training I. Introduction to UML - ttool.telecom-paris.frludovic.apvrille@telecom-paris.fr Eurecom, Office 223. Outline of the Training Introduction to UML Modeling with UML Main

Example: At Composite Structure Diagram Level

active class CarSystemArchitecture Diagram {1/1}active class CarSystemArchitecture Diagram {1/1}

toCartoCar fromCarfromCar

Ludovic Apvrille – TTool Training - 2004. Slide #47

c : Car[1]

c : Car[1]

d : Driver[1]

d : Driver[1]p1p1

fromCarfromCarp2p2

toCartoCar

Connector

Page 48: TTool Training I. Introduction to UML - ttool.telecom-paris.frludovic.apvrille@telecom-paris.fr Eurecom, Office 223. Outline of the Training Introduction to UML Modeling with UML Main

Example of State Machine Diagrams

LampOffLampOff

Start state

States

Ludovic Apvrille – TTool Training - 2004. Slide #48

lampOnlampOn

on()on() off()off()

Trigger

Page 49: TTool Training I. Introduction to UML - ttool.telecom-paris.frludovic.apvrille@telecom-paris.fr Eurecom, Office 223. Outline of the Training Introduction to UML Modeling with UML Main

Activity Diagrams

Ludovic Apvrille – TTool Training - 2004. Slide #49


Recommended