1 An Introduction to UML Interaction (Sequence and Communication) Diagrams Georgia State University CIS 3300 Spring, 2009.

Slides:



Advertisements
Similar presentations
Week 2 The Object-Oriented Approach to Requirements
Advertisements

SEQUENCE DIAGRAM. UML diagrams There are many ways of organizing the UML diagrams. Can be organized as the fallowing: 1. Structural diagrams: to show.
UML (Sequence Diagrams, Collaboration and State Chart Diagrams) Presentation By - SANDEEP REDDY CHEEDEPUDI (Student No: ) - VISHNU CHANDRADAS (Student.
© 2006 ITT Educational Services Inc. SE350 System Analysis for Software Engineers: Unit 9 Slide 1 Appendix 3 Object-Oriented Analysis and Design.
Object-Oriented Analysis and Design
Interaction Diagrams Software Engineering BIT8. Interaction Diagrams  A series of diagrams describing the dynamic behavior of an object-oriented system.
L4-1-S1 UML Overview © M.E. Fayad SJSU -- CmpE Software Architectures Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I.
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 1 UML Sequence Diagrams  Used during system.
1 © Wolfgang Pelz UML2 UML Part Two. 2 © Wolfgang Pelz UML2 Chapters Four & Twelve Interaction Diagrams.
Interaction Models. Interaction Definition An interaction is a behavior that comprises a set of messages exchanged among a set of objects within a context.
1 UML Component and Deployment Diagrams. Models, Views, and Diagrams Use Case Diagrams Use Case Diagrams Use Case Diagrams Scenario Diagrams Scenario.
C++ Training Datascope Lawrence D’Antonio Lecture 11 UML.
UML Sequence Diagrams Eileen Kraemer CSE 335 Michigan State University.
7M822 UML Interaction Diagrams 25 November 2010.
Slide 1 Chapter 8 Behavioral Modeling. Slide 2 Key Ideas Behavioral models describe the internal dynamic aspects of an information system that supports.
SE-565 Software System Requirements More UML Diagrams.
1 Lab Beginning Analysis and Design 4 Completion of first version of use case diagram initiates the processes of analysis and design. 4 UML provides.
Chapter 7: The Object-Oriented Approach to Requirements
1 Introduction to UML DIAGRAMS & CLASS DIAGRAM Chapter 7,8 主講人 : 許勝杰
SEQUENCE DIAGRAM Prepared by: T. Fatimah Alageel.
Interactions. 2 Objects communicate with each other by sending messages. Sending a message is another name for a member function call. –Some C++ examples.
Class, Sequence and UML Model.  Has actors and use cases.
1 Behavioral diagrams (2) Lecture p5 T120B pavasario sem.
1 On to Object Design Chapter 14 Applying UML and Patterns.
Conquering Complex and Changing Systems Object-Oriented Software Engineering Chapter 2, Modeling with UML.
Dynamic Modeling Chapter 11 Part of Analysis Modeling Designing Concurrent, Distributed, and Real-Time Applications with UML Hassan Gomaa (2001)
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 2, Modeling with UML: Review Session (Optional)
Behavioral Modeling Chapter 8.
ניתוח מערכות מידע 1 Unified Modeling Language (UML) § § The Unified Modeling Language (UML) is the industry-standard language for: Specifying, Visualizing,
7 Systems Analysis and Design in a Changing World, Fifth Edition.
UML Review of diagram types. 2 Unified Modeling Language The Unified Modeling Language™ (UML) was developed jointly by Grady Booch, Ivar Jacobson, and.
Discovering object interaction. Use case realisation The USE CASE diagram presents an outside view of the system. The functionality of the use case is.
Course Instructor: Kashif Ihsan 1. Chapter # 3 2.
Drawing System Sequence Diagrams
Bernd Bruegge & Allen Dutoit Object-Oriented Software Engineering: Conquering Complex and Changing Systems 1 Software Engineering September 19, 2001 UML.
UML as a Specification Language for Embedded Systems. By, Mir Ahmed Ali, Asst. Professor, ECM department, SNIST. By, Prof. Narsiah sir, Director of School.
UML Diagrams CSC 422 Kutztown University Dr. Daniel Spiegel.
UNIFIED MODELING LANGUAGE(UML) BY Touseef Tahir Lecturer CS COMSATS Institute of Information Technology, Lahore.
CS212: Object Oriented Analysis and Design Lecture 34: UML Activity and Collaboration diagram.
Using UML, Patterns, and Java Object-Oriented Software Engineering More on UML Note: Slides are adapted by Linda Sherrell from the Software Engineering.
Systems Analysis and Design in a Changing World, Fourth Edition
Lecture 9-1 : Intro. to UML (Unified Modeling Language)
 Building Block Building Block  Things in the UML Things in the UML  Structural Things Structural Things  Behavioral Things Behavioral Things  Grouping.
1 Technical & Business Writing (ENG-715) Muhammad Bilal Bashir UIIT, Rawalpindi.
1 IBM Software Group ® Essentials of Visual Modeling with UML 2.0 Module 5: Interaction Diagrams.
Chapter 3: Introducing the UML
UML - Development Process 1 Software Development Process Using UML.
Introduction to UML Hazleen Aris Software Eng. Dept., College of IT, UNITEN. …Unified Modeling Language.
Communication Diagrams Lecture 8. Introduction  Interaction Diagrams are used to model system dynamics  How do objects change state?  How do objects.
Diagrams. Typically, we view the static parts of a system using one of the four following diagrams. 1. Class diagram 2. Object diagram 3. Component diagram.
1 Kyung Hee University Interaction Diagrams Spring 2001.
7 Systems Analysis – ITEC 3155 The Object Oriented Approach – Use Cases.
1 7 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Chapter 7 The Object-Oriented Approach to Requirements.
Unified Modeling Language. What is UML? Standard language for specifying, visualizing, constructing, and documenting the artifacts of software systems,
1 Object Oriented Analysis System modeling = Functional modeling + Object modeling + Dynamic modeling Functional modeling = Use cases Object modeling =class.
ITEC1301 Object-Oriented Systems Construction Lecture Notes #4 1.
Systems Analysis and Design in a Changing World, Fourth Edition
Chapter 2, Modeling with UML
UML Diagrams By Daniel Damaris Novarianto S..
Course Outcomes of Object Oriented Modeling Design (17630,C604)
Dynamic Modeling of Banking System Case Study - II
UML Diagrams Jung Woo.
UML dynamic Modeling (Behavior Diagram)
Interactions.
UML Overview Part 2.
Unified Modeling Language
Week 12: Activity & Sequence Diagrams
CIS 375 Bruce R. Maxim UM-Dearborn
Uml diagrams In ooad.
Chapter 4 Sequence Diagrams
Presentation transcript:

1 An Introduction to UML Interaction (Sequence and Communication) Diagrams Georgia State University CIS 3300 Spring, 2009

Models, Views, and Diagrams Use Case Diagrams Use Case Diagrams Use Case Diagrams Scenario Diagrams Scenario Diagrams Communication Diagrams State Diagrams State Diagrams Component Diagrams Component Diagrams Component Diagrams Deployment Diagrams State Diagrams State Diagrams Object Diagrams Scenario Diagrams Scenario Diagrams State Machine Diagrams Use Case Diagrams Use Case Diagrams Sequence Diagrams State Diagrams State Diagrams Class Diagrams Activity Diagrams A model is a complete description of a system from a particular perspective Models

3 Behavioral Diagrams Used to visualize, specify, construct, document dynamic aspects of system: use case diagram sequence diagram communication diagram state machine diagram activity diagram

4 Diagramming Scenarios: UML ways of expressing scenarios Activity diagrams Several scenarios (even a full use case) at once Similar to Petri nets, Graphcet, (concurrent) flow charts… Interaction (sequence and communication) diagrams Only one scenario per diagram Involve/introduce (high level) objects Sequence diagram Accent on the time flow Communication diagram Accent on the messages between objects

5 Interaction Diagrams (Sequence and Communication) Describe how groups of objects collaborate in some behavior Sequence diagrams Time-oriented Communication diagrams Message-oriented

6 Diagramming Scenarios: Sequence Diagrams Describe one scenario Involve objects and messages Shows a number of objects and the messages that are passed between these objects. Accent is on the time flow of events

7 Simple scenario: Diagramming Scenarios: Sequence Diagrams We have an order and are going to invoke a command on it to calculate its price. To do that, the order needs to look at all the line items on the order and determine their prices, which are based on the pricing rules of the order’s line products. Having done that for all the line items, the order then needs to compute an overall discount, which is based on rules tied to the customer.

10 Sequence Diagrams UML 1.0 versus UML 2.0: Objects pass messages (UML 1.0) Participants pass messages (UML 2.0) Show how participants (objects) interact. Differences in interaction styles: Fig 4-1: Centralized, e.g. one participant does all the processing and other participants supply data. Fig 4-2: Distributed, e.g. processing is split among many participants.

11 Diagramming Scenarios: Sequence Diagrams (cont.) get_Customer_Information() select_transaction(sel) display_menu() quit Customer Bank time card_taken eject_card card_returned insert_card ATM Session « new » Transaction « new » display_menu()

12 Interaction and Message An interaction is a behavior that comprises a set of messages, exchanged among a set of objects, to accomplish a specific purpose. A message is the specification of a communication between objects that conveys information, with the expectation that some kind of activity will ensue.

13 Sequence Diagram A sequence diagram is an interaction diagram that emphasizes the time ordering of messages. A lifeline is a vertical dashed line that represents the lifetime of an object. A focus of control is a tall, thin rectangle that shows the period of time during which an object is performing an action.

14 Sequence Diagram Notation

15 Sequence Diagram Notation

16 Sequence Diagram Notation

17 Sequence Diagram Captures dynamic behavior (time- oriented) Purpose Model flow of control Illustrate typical scenarios

18

UML Sequence Diagrams Used during requirements analysis To refine use case descriptions to find additional objects (“participating objects”) Used during system design to refine subsystem interfaces Classes (and objects) are represented by columns Messages are represented by arrows Activations are represented by narrow rectangles Lifelines are represented by dashed lines selectZone() pickupChange() pickUpTicket() insertCoins() Passenger TicketMachine

UML Sequence Diagrams: Nested Messages The source of an arrow indicates the activation which sent the message An activation is as long as all nested activations selectZone() Passenger ZoneButton TarifScheduleDisplay lookupPrice(selection) displayPrice(price) price Dataflow …to be continued...

21 Sequence Diagram Observations UML sequence diagram represent behavior in terms of interactions. Complement the class diagrams which represent structure. Useful to find participating objects. Time consuming to build but worth the investment.

22 Diagramming Scenarios: Communication Diagrams Describe one scenario Involve objects and messages Accent is on messages exchanged between objects Sequence and Communication diagrams are largely equivalent.

23 Diagramming Scenarios: Communication Diagrams (cont.) : Customer : ATM : Bank : Session : Transaction 1: insert_card 7: card_taken 4: select_transaction 3: get_customer_information 5: « create »2: « create » 6: eject_card

24 Communication Diagram A communication diagram is an interaction diagram that emphasizes the organization of the objects that participate in the interaction. A path is a link between objects, perhaps with a stereotype such as «local» attached. Sequence numbers indicate the time ordering of messages, to one or more levels.

25 Communication Diagram Captures dynamic behavior (message- oriented) Purpose Model flow of control Illustrate coordination of object structure and control

26 Communication Diagram Notation

27 Communication Diagram Notation

28