LlosengCh08E2 - Object-Oriented Software Engineering...

Info iconThis preview shows pages 1–12. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour Lethbridge/Laganire 2005 Chapter 8: Modelling Interactions and Behaviour 2 8.1 Interaction Diagrams Interaction diagrams are used to model the dynamic aspects of a software system They help you to visualize how the system runs. An interaction diagram is often built from a use case and a class diagram. The objective is to show how a set of objects accomplish the required interactions with an actor. Lethbridge/Laganire 2005 Chapter 8: Modelling Interactions and Behaviour 3 Interactions and messages Interaction diagrams show how a set of actors and objects communicate with each other to perform: The steps of a use case, or The steps of some other piece of functionality. The set of steps, taken together, is called an interaction . Interaction diagrams can show several different types of communication. e.g. method calls, messages sent over the network These are all referred to as messages . Lethbridge/Laganire 2005 Chapter 8: Modelling Interactions and Behaviour 4 Elements found in interaction diagrams Instances of classes Shown as boxes with the class and object identifier underlined Actors Use the stick-person symbol as in use case diagrams Messages Shown as arrows from actor to object, or from object to object Lethbridge/Laganire 2005 Chapter 8: Modelling Interactions and Behaviour 5 Creating interaction diagrams You should develop a class diagram and a use case model before starting to create an interaction diagram. There are two kinds of interaction diagrams: Sequence diagrams Communication diagrams (not discussed) Lethbridge/Laganire 2005 Chapter 8: Modelling Interactions and Behaviour 6 Sequence diagrams an example Lethbridge/Laganire 2005 Chapter 8: Modelling Interactions and Behaviour 7 Sequence diagrams A sequence diagram shows the sequence of messages exchanged by the set of objects performing a certain task The objects are arranged horizontally across the diagram. An actor that initiates the interaction is often shown on the left. The vertical dimension represents time. A vertical line, called a lifeline , is attached to each object or actor. A message is represented as an arrow between activation boxes of the sender and receiver. A message is labelled and can have an argument list and a return value. Lethbridge/Laganire 2005 Chapter 8: Modelling Interactions and Behaviour 8 Sequence diagrams same example, more details Lethbridge/Laganire 2005 Chapter 8: Modelling Interactions and Behaviour 9 Sequence diagrams an example with replicated messages An iteration over objects is indicated by an asterisk preceding the message name Lethbridge/Laganire 2005 Chapter 8: Modelling Interactions and Behaviour 10 Sequence diagrams an example with object deletion If an objects life ends, this is shown with an X at the end of the lifeline Lethbridge/Laganire 2005 Chapter 8: Modelling Interactions and Behaviour 11 Communication diagrams an example Lethbridge/Laganire 2005...
View Full Document

This note was uploaded on 02/21/2012 for the course CS 307 taught by Professor Staff during the Fall '08 term at Purdue University-West Lafayette.

Page1 / 48

LlosengCh08E2 - Object-Oriented Software Engineering...

This preview shows document pages 1 - 12. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online