lecture11_2up - Object-Oriented Software Engineering...

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

View Full Document Right Arrow Icon
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour Lecture 11 546 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.
Background image of page 1

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

View Full DocumentRight Arrow Icon
547 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 send over the network —These are all referred to as messages . 548 Elements found in interaction diagrams • Instances of classes —Shown as boxes with the class and object identiFer 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
Background image of page 2
549 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 550 Sequence diagrams – an example
Background image of page 3

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

View Full DocumentRight Arrow Icon
551 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. • The lifeline becomes a broad box, called an activation box during the live activation period. • 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. 552 Sequence diagrams – same example, more details
Background image of page 4
553 Sequence diagrams – an example with replicated messages • An iteration over objects is indicated by an asterisk preceding the message name 554 Sequence diagrams – an example with object deletion • If an object’s life ends, this is shown with an X at the end of the lifeline
Background image of page 5

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

View Full DocumentRight Arrow Icon
555 Communication diagrams – an example 556 Communication diagrams Communication diagrams emphasize how the objects collaborate in order to realize an interaction • A communication diagram is a graph with the objects as the vertices. • Communication links are added between objects
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

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

Page1 / 24

lecture11_2up - Object-Oriented Software Engineering...

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

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