SlideShare a Scribd company logo
1 of 29
Arab Open University
2nd
Semester, 2006-2007
M301
Unit 4.4
Interactions
reem.attas@arabou.org.sa
Reem AlAttas © 2
Topic Road Map
 Design by Contract
Starting Dynamic Modeling
Working with Interaction Diagrams
Design Decisions
Reem AlAttas © 3
Design by Contract
The process of developing software based
on the notion of a contract between
objects.
Assertions:
 Pre-conditions.
 Post-conditions.
 Invariants.
Reem AlAttas © 4
Example
Reem AlAttas © 5
Topic Road Map
Design by Contract
 Starting Dynamic Modeling
Working with Interaction Diagrams
Design Decisions
Reem AlAttas © 6
Interaction Diagrams
Sequence diagrams and collaboration
diagrams (known collectively as
interaction diagrams) are notations to help
make and record decisions relating to the
behavior defined for each class.
Reem AlAttas © 7
… Interaction Diagrams
A sequence diagram shows the flow of
messages from object to object as time
passes by.
A collaboration diagram shows the objects
and their links (the structure).
Reem AlAttas © 8
Sequence Diagram (Check In)
Reem AlAttas © 9
Main Elements
Objects  rectangles.
Messages  arrows.
Object’s lifeline  dashed line.
Indication that a particular object is ‘active’
for a given period of time  long rectangle
overlaid on that object’s lifeline.
Reem AlAttas © 10
Notes
The return of flow of control from the
receiver is not normally shown.
If one object sends a message to another,
there should be an association between
the classes and that association requires
managing.
Reem AlAttas © 11
Topic Road Map
Design by Contract
Starting Dynamic Modeling
 Working with Interaction Diagrams
Design Decisions
Reem AlAttas © 12
CASE Tools
Some CASE tools can generate a
collaboration diagram from a sequence
diagram and vice versa  Find out if
StarUML can do this?
Reem AlAttas © 13
Collaboration Diagrams
Reem AlAttas © 14
Numbering System
Why not use a simple numbering system
1, 2, 3 ?
Reem AlAttas © 15
1st
Message Sequence
Reem AlAttas © 16
2nd
Message Sequence
Reem AlAttas © 17
… Numbering System
A message number always contains as its
prefix the number of the message that
gave rise to it.
Reem AlAttas © 18
Comparison
 A collaboration diagram shows the links between
objects (the local structure), whereas a
sequence diagram does not. In a sequence
diagram, the message arrow implies a link
between two objects.
 The time ordering of messages is clear in a
sequence diagram. Some form of numbering is
needed in a collaboration diagram to show which
message comes before or after another.
Reem AlAttas © 19
Parameterized Interactions
Reem AlAttas © 20
Creation and Deletion in Sequence
Diagram
Reem AlAttas © 21
Creation and Deletion in Collaboration
Diagram
 {new} and {destroyed}.
 If you want to show an object’s complete lifecycle in one
interaction, you can use the {transient} constraint.
Otherwise you should treat creation and destruction as
two separate interactions and show them on two
separate collaboration diagrams.
Reem AlAttas © 22
Topic Road Map
Design by Contract
Starting Dynamic Modeling
Working with Interaction Diagrams
 Design Decisions
Reem AlAttas © 23
Naming the Link Manipulation Methods
Reem AlAttas © 24
Indirect Messages
 Suppose that the company needs to collect
information about the ages of all its employees.
Reem AlAttas © 25
Fork
Reem AlAttas © 26
Cascade
Reem AlAttas © 27
Law of Demeter
The Law of Demeter states that a method,
say m, in a class A should not refer to
another class, say B, unless B is the class
of:
 An instance variable used in the method m.
 A parameter to the method m.
 An object created in the method m.
 A global variable used in the method m.
TMA4 – Q4
Thank You!

More Related Content

Viewers also liked

Fisica 2 Diana Patricia Lara Aranda
Fisica 2 Diana Patricia Lara ArandaFisica 2 Diana Patricia Lara Aranda
Fisica 2 Diana Patricia Lara ArandaLaraAranda
 
From Model to Implementation II
From Model to Implementation IIFrom Model to Implementation II
From Model to Implementation IIReem Alattas
 
Mga sinaunang kabihasnan sa asya
Mga sinaunang kabihasnan sa asyaMga sinaunang kabihasnan sa asya
Mga sinaunang kabihasnan sa asyaanthonycabilao
 
대신리포트_모닝미팅_151001
대신리포트_모닝미팅_151001대신리포트_모닝미팅_151001
대신리포트_모닝미팅_151001DaishinSecurities
 
SETAC meeting 2014
SETAC meeting 2014SETAC meeting 2014
SETAC meeting 2014Sam Supowit
 
ACS Boston seminar presentation 2015
ACS Boston seminar presentation 2015ACS Boston seminar presentation 2015
ACS Boston seminar presentation 2015Sam Supowit
 
Trailer analysis
Trailer analysisTrailer analysis
Trailer analysist-chow28
 
BUENOS AIRES
BUENOS AIRESBUENOS AIRES
BUENOS AIRESYuyi Love
 
How to reach people in the Mobile Era: Omnichannel or Bust
How to reach people in the Mobile Era: Omnichannel or BustHow to reach people in the Mobile Era: Omnichannel or Bust
How to reach people in the Mobile Era: Omnichannel or BustKahuna
 

Viewers also liked (20)

Orange Shirt Day
Orange Shirt DayOrange Shirt Day
Orange Shirt Day
 
Discovery Styleguide V2
Discovery Styleguide V2Discovery Styleguide V2
Discovery Styleguide V2
 
thesis
thesisthesis
thesis
 
Fisica 2 Diana Patricia Lara Aranda
Fisica 2 Diana Patricia Lara ArandaFisica 2 Diana Patricia Lara Aranda
Fisica 2 Diana Patricia Lara Aranda
 
Peterson-Ret
Peterson-RetPeterson-Ret
Peterson-Ret
 
IIA Tasks 3
IIA Tasks 3IIA Tasks 3
IIA Tasks 3
 
From Model to Implementation II
From Model to Implementation IIFrom Model to Implementation II
From Model to Implementation II
 
Mga sinaunang kabihasnan sa asya
Mga sinaunang kabihasnan sa asyaMga sinaunang kabihasnan sa asya
Mga sinaunang kabihasnan sa asya
 
대신리포트_모닝미팅_151001
대신리포트_모닝미팅_151001대신리포트_모닝미팅_151001
대신리포트_모닝미팅_151001
 
MDS_mod
MDS_modMDS_mod
MDS_mod
 
Articolo_Bocelli_
Articolo_Bocelli_Articolo_Bocelli_
Articolo_Bocelli_
 
Modal verbs
Modal verbsModal verbs
Modal verbs
 
SETAC meeting 2014
SETAC meeting 2014SETAC meeting 2014
SETAC meeting 2014
 
Maridajes - Comer con Vino
Maridajes - Comer con VinoMaridajes - Comer con Vino
Maridajes - Comer con Vino
 
ACS Boston seminar presentation 2015
ACS Boston seminar presentation 2015ACS Boston seminar presentation 2015
ACS Boston seminar presentation 2015
 
Trailer analysis
Trailer analysisTrailer analysis
Trailer analysis
 
BUENOS AIRES
BUENOS AIRESBUENOS AIRES
BUENOS AIRES
 
Competencias Unidad 3
Competencias Unidad 3Competencias Unidad 3
Competencias Unidad 3
 
How to reach people in the Mobile Era: Omnichannel or Bust
How to reach people in the Mobile Era: Omnichannel or BustHow to reach people in the Mobile Era: Omnichannel or Bust
How to reach people in the Mobile Era: Omnichannel or Bust
 
Ver to be
Ver to beVer to be
Ver to be
 

Similar to Interactions

Classes and Associations
Classes and AssociationsClasses and Associations
Classes and AssociationsReem Alattas
 
Approaches to Software Development
Approaches to Software DevelopmentApproaches to Software Development
Approaches to Software DevelopmentReem Alattas
 
SOURCE CODE MANAGEMENT SYSTEM (GITHUB)
SOURCE CODE MANAGEMENT SYSTEM (GITHUB)SOURCE CODE MANAGEMENT SYSTEM (GITHUB)
SOURCE CODE MANAGEMENT SYSTEM (GITHUB)Gracy Joseph
 
Introduction to Rational Rose
Introduction to Rational RoseIntroduction to Rational Rose
Introduction to Rational RoseMunaam Munawar
 
From Model to Implementation I
From Model to Implementation IFrom Model to Implementation I
From Model to Implementation IReem Alattas
 
se_lectures.DS_Store__MACOSXse_lectures._.DS_Storese_
se_lectures.DS_Store__MACOSXse_lectures._.DS_Storese_se_lectures.DS_Store__MACOSXse_lectures._.DS_Storese_
se_lectures.DS_Store__MACOSXse_lectures._.DS_Storese_WilheminaRossi174
 
Component based models and technology
Component based models and technologyComponent based models and technology
Component based models and technologyMayukh Maitra
 
Component based models and technology
Component based models and technologyComponent based models and technology
Component based models and technologySaransh Garg
 
Collaboration Diagram
Collaboration DiagramCollaboration Diagram
Collaboration Diagramfahad_uaar
 
Process Quality Management, Human Resources, Quality Assurance
Process Quality Management, Human Resources, QualityAssuranceProcess Quality Management, Human Resources, QualityAssurance
Process Quality Management, Human Resources, Quality AssuranceReem Alattas
 
BIM Usage in Construction Industry and An application of Clash Detection and ...
BIM Usage in Construction Industry and An application of Clash Detection and ...BIM Usage in Construction Industry and An application of Clash Detection and ...
BIM Usage in Construction Industry and An application of Clash Detection and ...Ravindra SSK Medicharla
 
OOAD-Unit-3.ppt UML and ANALYSISI AND DESIGN
OOAD-Unit-3.ppt UML and ANALYSISI AND DESIGNOOAD-Unit-3.ppt UML and ANALYSISI AND DESIGN
OOAD-Unit-3.ppt UML and ANALYSISI AND DESIGNKalyaniLokhande5
 
Another Simple but Faster Method for 2D Line Clipping
Another Simple but Faster Method for 2D Line ClippingAnother Simple but Faster Method for 2D Line Clipping
Another Simple but Faster Method for 2D Line Clippingijcga
 

Similar to Interactions (20)

Classes and Associations
Classes and AssociationsClasses and Associations
Classes and Associations
 
Approaches to Software Development
Approaches to Software DevelopmentApproaches to Software Development
Approaches to Software Development
 
SOURCE CODE MANAGEMENT SYSTEM (GITHUB)
SOURCE CODE MANAGEMENT SYSTEM (GITHUB)SOURCE CODE MANAGEMENT SYSTEM (GITHUB)
SOURCE CODE MANAGEMENT SYSTEM (GITHUB)
 
Chap3 slides
Chap3 slidesChap3 slides
Chap3 slides
 
Ch7
Ch7Ch7
Ch7
 
Ch7
Ch7Ch7
Ch7
 
Introduction to Rational Rose
Introduction to Rational RoseIntroduction to Rational Rose
Introduction to Rational Rose
 
Agile Dev. I
Agile Dev. IAgile Dev. I
Agile Dev. I
 
From Model to Implementation I
From Model to Implementation IFrom Model to Implementation I
From Model to Implementation I
 
DZone_RC_RxJS
DZone_RC_RxJSDZone_RC_RxJS
DZone_RC_RxJS
 
se_lectures.DS_Store__MACOSXse_lectures._.DS_Storese_
se_lectures.DS_Store__MACOSXse_lectures._.DS_Storese_se_lectures.DS_Store__MACOSXse_lectures._.DS_Storese_
se_lectures.DS_Store__MACOSXse_lectures._.DS_Storese_
 
Component based models and technology
Component based models and technologyComponent based models and technology
Component based models and technology
 
Component based models and technology
Component based models and technologyComponent based models and technology
Component based models and technology
 
IGNOU PERT CPM
IGNOU PERT CPMIGNOU PERT CPM
IGNOU PERT CPM
 
Collaboration Diagram
Collaboration DiagramCollaboration Diagram
Collaboration Diagram
 
Types of UML diagrams
Types of UML diagramsTypes of UML diagrams
Types of UML diagrams
 
Process Quality Management, Human Resources, Quality Assurance
Process Quality Management, Human Resources, QualityAssuranceProcess Quality Management, Human Resources, QualityAssurance
Process Quality Management, Human Resources, Quality Assurance
 
BIM Usage in Construction Industry and An application of Clash Detection and ...
BIM Usage in Construction Industry and An application of Clash Detection and ...BIM Usage in Construction Industry and An application of Clash Detection and ...
BIM Usage in Construction Industry and An application of Clash Detection and ...
 
OOAD-Unit-3.ppt UML and ANALYSISI AND DESIGN
OOAD-Unit-3.ppt UML and ANALYSISI AND DESIGNOOAD-Unit-3.ppt UML and ANALYSISI AND DESIGN
OOAD-Unit-3.ppt UML and ANALYSISI AND DESIGN
 
Another Simple but Faster Method for 2D Line Clipping
Another Simple but Faster Method for 2D Line ClippingAnother Simple but Faster Method for 2D Line Clipping
Another Simple but Faster Method for 2D Line Clipping
 

More from Reem Alattas

Rumble Lights Pitch Deck
Rumble Lights Pitch DeckRumble Lights Pitch Deck
Rumble Lights Pitch DeckReem Alattas
 
NASA Datanauts Water Cooler Chat: Autonomous Design of Modular Robots
NASA Datanauts Water Cooler Chat: Autonomous Design of Modular RobotsNASA Datanauts Water Cooler Chat: Autonomous Design of Modular Robots
NASA Datanauts Water Cooler Chat: Autonomous Design of Modular RobotsReem Alattas
 
She looks just like me 2017
She looks just like me 2017She looks just like me 2017
She looks just like me 2017Reem Alattas
 
Nasa Datanauts Water Cooler Chat: Robotics for Space Exploration
Nasa Datanauts Water Cooler Chat: Robotics for Space ExplorationNasa Datanauts Water Cooler Chat: Robotics for Space Exploration
Nasa Datanauts Water Cooler Chat: Robotics for Space ExplorationReem Alattas
 
Nasa Datanauts Water Cooler Chat: Evolutionary Robots for Space Exploration
Nasa Datanauts Water Cooler Chat: Evolutionary Robots for Space ExplorationNasa Datanauts Water Cooler Chat: Evolutionary Robots for Space Exploration
Nasa Datanauts Water Cooler Chat: Evolutionary Robots for Space ExplorationReem Alattas
 
She Looks Just Like Me 2017
She Looks Just Like Me 2017She Looks Just Like Me 2017
She Looks Just Like Me 2017Reem Alattas
 
Evolutionary Algorithms
Evolutionary AlgorithmsEvolutionary Algorithms
Evolutionary AlgorithmsReem Alattas
 
Evolutionary Robotics
Evolutionary RoboticsEvolutionary Robotics
Evolutionary RoboticsReem Alattas
 
Enhancing input on and above the interactive surface
Enhancing input on and above the interactive surfaceEnhancing input on and above the interactive surface
Enhancing input on and above the interactive surfaceReem Alattas
 
Skinput: Appropriating the Body as an Input Surface
Skinput: Appropriating the Body as an Input SurfaceSkinput: Appropriating the Body as an Input Surface
Skinput: Appropriating the Body as an Input SurfaceReem Alattas
 
XML - EXtensible Markup Language
XML - EXtensible Markup LanguageXML - EXtensible Markup Language
XML - EXtensible Markup LanguageReem Alattas
 
Dynamic HTML Event Model
Dynamic HTML Event ModelDynamic HTML Event Model
Dynamic HTML Event ModelReem Alattas
 
DHTML - Dynamic HTML
DHTML - Dynamic HTMLDHTML - Dynamic HTML
DHTML - Dynamic HTMLReem Alattas
 
JavaScript Objects
JavaScript ObjectsJavaScript Objects
JavaScript ObjectsReem Alattas
 
Linear Search & Binary Search
Linear Search & Binary SearchLinear Search & Binary Search
Linear Search & Binary SearchReem Alattas
 
JavaScript Arrays
JavaScript Arrays JavaScript Arrays
JavaScript Arrays Reem Alattas
 
JavaScript Functions
JavaScript Functions JavaScript Functions
JavaScript Functions Reem Alattas
 

More from Reem Alattas (20)

Rumble Lights Pitch Deck
Rumble Lights Pitch DeckRumble Lights Pitch Deck
Rumble Lights Pitch Deck
 
NASA Datanauts Water Cooler Chat: Autonomous Design of Modular Robots
NASA Datanauts Water Cooler Chat: Autonomous Design of Modular RobotsNASA Datanauts Water Cooler Chat: Autonomous Design of Modular Robots
NASA Datanauts Water Cooler Chat: Autonomous Design of Modular Robots
 
She looks just like me 2017
She looks just like me 2017She looks just like me 2017
She looks just like me 2017
 
Nasa Datanauts Water Cooler Chat: Robotics for Space Exploration
Nasa Datanauts Water Cooler Chat: Robotics for Space ExplorationNasa Datanauts Water Cooler Chat: Robotics for Space Exploration
Nasa Datanauts Water Cooler Chat: Robotics for Space Exploration
 
Nasa Datanauts Water Cooler Chat: Evolutionary Robots for Space Exploration
Nasa Datanauts Water Cooler Chat: Evolutionary Robots for Space ExplorationNasa Datanauts Water Cooler Chat: Evolutionary Robots for Space Exploration
Nasa Datanauts Water Cooler Chat: Evolutionary Robots for Space Exploration
 
She Looks Just Like Me 2017
She Looks Just Like Me 2017She Looks Just Like Me 2017
She Looks Just Like Me 2017
 
Tran helmet pitch
Tran helmet pitchTran helmet pitch
Tran helmet pitch
 
Evolutionary Algorithms
Evolutionary AlgorithmsEvolutionary Algorithms
Evolutionary Algorithms
 
Evolutionary Robotics
Evolutionary RoboticsEvolutionary Robotics
Evolutionary Robotics
 
Create a Need
Create a NeedCreate a Need
Create a Need
 
Enhancing input on and above the interactive surface
Enhancing input on and above the interactive surfaceEnhancing input on and above the interactive surface
Enhancing input on and above the interactive surface
 
Skinput: Appropriating the Body as an Input Surface
Skinput: Appropriating the Body as an Input SurfaceSkinput: Appropriating the Body as an Input Surface
Skinput: Appropriating the Body as an Input Surface
 
XML - EXtensible Markup Language
XML - EXtensible Markup LanguageXML - EXtensible Markup Language
XML - EXtensible Markup Language
 
Dynamic HTML Event Model
Dynamic HTML Event ModelDynamic HTML Event Model
Dynamic HTML Event Model
 
PHP Scripting
PHP ScriptingPHP Scripting
PHP Scripting
 
DHTML - Dynamic HTML
DHTML - Dynamic HTMLDHTML - Dynamic HTML
DHTML - Dynamic HTML
 
JavaScript Objects
JavaScript ObjectsJavaScript Objects
JavaScript Objects
 
Linear Search & Binary Search
Linear Search & Binary SearchLinear Search & Binary Search
Linear Search & Binary Search
 
JavaScript Arrays
JavaScript Arrays JavaScript Arrays
JavaScript Arrays
 
JavaScript Functions
JavaScript Functions JavaScript Functions
JavaScript Functions
 

Recently uploaded

Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 

Recently uploaded (20)

Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 

Interactions

  • 1. Arab Open University 2nd Semester, 2006-2007 M301 Unit 4.4 Interactions reem.attas@arabou.org.sa
  • 2. Reem AlAttas © 2 Topic Road Map  Design by Contract Starting Dynamic Modeling Working with Interaction Diagrams Design Decisions
  • 3. Reem AlAttas © 3 Design by Contract The process of developing software based on the notion of a contract between objects. Assertions:  Pre-conditions.  Post-conditions.  Invariants.
  • 4. Reem AlAttas © 4 Example
  • 5. Reem AlAttas © 5 Topic Road Map Design by Contract  Starting Dynamic Modeling Working with Interaction Diagrams Design Decisions
  • 6. Reem AlAttas © 6 Interaction Diagrams Sequence diagrams and collaboration diagrams (known collectively as interaction diagrams) are notations to help make and record decisions relating to the behavior defined for each class.
  • 7. Reem AlAttas © 7 … Interaction Diagrams A sequence diagram shows the flow of messages from object to object as time passes by. A collaboration diagram shows the objects and their links (the structure).
  • 8. Reem AlAttas © 8 Sequence Diagram (Check In)
  • 9. Reem AlAttas © 9 Main Elements Objects  rectangles. Messages  arrows. Object’s lifeline  dashed line. Indication that a particular object is ‘active’ for a given period of time  long rectangle overlaid on that object’s lifeline.
  • 10. Reem AlAttas © 10 Notes The return of flow of control from the receiver is not normally shown. If one object sends a message to another, there should be an association between the classes and that association requires managing.
  • 11. Reem AlAttas © 11 Topic Road Map Design by Contract Starting Dynamic Modeling  Working with Interaction Diagrams Design Decisions
  • 12. Reem AlAttas © 12 CASE Tools Some CASE tools can generate a collaboration diagram from a sequence diagram and vice versa  Find out if StarUML can do this?
  • 13. Reem AlAttas © 13 Collaboration Diagrams
  • 14. Reem AlAttas © 14 Numbering System Why not use a simple numbering system 1, 2, 3 ?
  • 15. Reem AlAttas © 15 1st Message Sequence
  • 16. Reem AlAttas © 16 2nd Message Sequence
  • 17. Reem AlAttas © 17 … Numbering System A message number always contains as its prefix the number of the message that gave rise to it.
  • 18. Reem AlAttas © 18 Comparison  A collaboration diagram shows the links between objects (the local structure), whereas a sequence diagram does not. In a sequence diagram, the message arrow implies a link between two objects.  The time ordering of messages is clear in a sequence diagram. Some form of numbering is needed in a collaboration diagram to show which message comes before or after another.
  • 19. Reem AlAttas © 19 Parameterized Interactions
  • 20. Reem AlAttas © 20 Creation and Deletion in Sequence Diagram
  • 21. Reem AlAttas © 21 Creation and Deletion in Collaboration Diagram  {new} and {destroyed}.  If you want to show an object’s complete lifecycle in one interaction, you can use the {transient} constraint. Otherwise you should treat creation and destruction as two separate interactions and show them on two separate collaboration diagrams.
  • 22. Reem AlAttas © 22 Topic Road Map Design by Contract Starting Dynamic Modeling Working with Interaction Diagrams  Design Decisions
  • 23. Reem AlAttas © 23 Naming the Link Manipulation Methods
  • 24. Reem AlAttas © 24 Indirect Messages  Suppose that the company needs to collect information about the ages of all its employees.
  • 25. Reem AlAttas © 25 Fork
  • 26. Reem AlAttas © 26 Cascade
  • 27. Reem AlAttas © 27 Law of Demeter The Law of Demeter states that a method, say m, in a class A should not refer to another class, say B, unless B is the class of:  An instance variable used in the method m.  A parameter to the method m.  An object created in the method m.  A global variable used in the method m.