tailieunhanh - Lecture Object-oriented software engineering - Chapter 8: Modeling interactions and behavior

Lecture Object-oriented software engineering - Chapter 8 presents the following content: Interaction diagrams, state diagrams, activity diagrams, implementing classes based on interaction and state diagrams, difficulties and risks in modeling interactions and behavior. | Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour 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/Laganière 2005 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. . method calls, messages send over the network These are all referred to as messages. © Lethbridge/Laganière 2005 Elements found in interaction diagrams Instances of . | Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour 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/Laganière 2005 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. . method calls, messages send over the network These are all referred to as messages. © Lethbridge/Laganière 2005 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/Laganière 2005 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 © Lethbridge/Laganière 2005 Sequence diagrams – an example © Lethbridge/Laganière 2005 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

TÀI LIỆU LIÊN QUAN