UML Sequence Diagrams Michael L. Collard, Ph.D. Department of Computer Science Kent State University.

Slides:



Advertisements
Similar presentations
UML Diagrams Jung Woo. What is UML? Standard language for specifying, visualizing, constructing, and documenting the artifacts of software systems, business.
Advertisements

UML (Sequence Diagrams, Collaboration and State Chart Diagrams) Presentation By - SANDEEP REDDY CHEEDEPUDI (Student No: ) - VISHNU CHANDRADAS (Student.
1 Behavioral Modeling Chapter 8. 2 Key Ideas Behavioral models describe the internal dynamic aspects of an information system that supports business processes.
A Brief Introduction. Acknowledgements  The material in this tutorial is based in part on: Concurrency: State Models & Java Programming, by Jeff Magee.
Chapter 22 Object-Oriented Systems Analysis and Design and UML Systems Analysis and Design Kendall and Kendall Fifth Edition.
UML: Use Cases Michael L. Collard, Ph.D. Department of Computer Science Kent State University.
Unified Modeling Language UML Jonathan I. Maletic, Ph.D. Department of Computer Science Kent State University.
2-1 © Prentice Hall, 2007 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
L4-1-S1 UML Overview © M.E. Fayad SJSU -- CmpE Software Architectures Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I.
Unified Modeling Language (UML) Fawzi Emad Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
C++ Training Datascope Lawrence D’Antonio Lecture 11 UML.
Copyright 2004 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Second Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix.
UML Sequence Diagrams Eileen Kraemer CSE 335 Michigan State University.
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.
An Introduction to Rational Rose Real-Time
UML. Overview of UML Diagrams Structural : element of spec. irrespective of time Class Component Deployment Object Composite structure Package Behavioral.
Unified Modeling Language
Object-Oriented Analysis and Design
Basic Concepts The Unified Modeling Language (UML) SYSC System Analysis and Design.
1 Introduction to UML DIAGRAMS & CLASS DIAGRAM Chapter 7,8 主講人 : 許勝杰
UML Collaboration Diagram. Recap System Sequence Diagrams (SSD) UML for SSD Examples.
Class, Sequence and UML Model.  Has actors and use cases.
The Unified Modeling Language Part I Omar Meqdadi SE 2730 Lecture 6 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Copyright 2001 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix A Object-Oriented.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 20 Object-Oriented.
Unified Modeling Language, Version 2.0
Systems Analysis and Design in a Changing World, 3rd Edition
1 Devon M. Simmonds University of North Carolina, Wilmington CSC450 Software Engineering WorkFlow Modeling with Activity Diagrams.
Requirements as Usecases Capturing the REQUIREMENT ANALYSIS DESIGN IMPLEMENTATION TEST.
Behavioral Modeling Chapter 8.
Real Time Systems Modeling Structure in UML (Part I)
UML diagrams What is UML UML diagrams –Static modeoing –Dynamic modeling 1.
Unified Modeling Language* Keng Siau University of Nebraska-Lincoln *Adapted from “Software Architecture and the UML” by Grady Booch.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
ניתוח מערכות מידע 1 Unified Modeling Language (UML) § § The Unified Modeling Language (UML) is the industry-standard language for: Specifying, Visualizing,
Fall 2010 CS4310 Requirements Engineering A Brief Review of UML & OO Dr. Guoqiang Hu Department of Computer Science UTEP 1.
L6-S1 UML Overview 2003 SJSU -- CmpE Advanced Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College.
TAL7011 – Lecture 4 UML for Architecture Modeling.
The Unified Modeling Language Part II Omar Meqdadi SE 2730 Lecture 9 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
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.
UML as a Specification Language for Embedded Systems. By, Mir Ahmed Ali, Asst. Professor, ECM department, SNIST. By, Prof. Narsiah sir, Director of School.
Logical view –show classes and objects Process view –models the executables Implementation view –Files, configuration and versions Deployment view –Physical.
Unified Modeling Language. Object Oriented Methods ► What are object-oriented (OO) methods?  OO methods provide a set of techniques for analyzing, decomposing,
UML Diagrams CSC 422 Kutztown University Dr. Daniel Spiegel.
Software Engineering Lecture 8 Object-Oriented Analysis.
OMT Modeling 1. Object Model : presented by the object model and the data dictionary. 2. Dynamic Model: presented by the state diagrams and event flow.
©2007 · Georges Merx and Ronald J. NormanSlide 1 Chapter 15 The Unified Modeling Language: a Primer.
Dynamic Models Sequence Diagrams Collaboration Diagrams Activity Diagrams.
Lecture 9-1 : Intro. to UML (Unified Modeling Language)
1 Technical & Business Writing (ENG-715) Muhammad Bilal Bashir UIIT, Rawalpindi.
1 Unified Modeling Language, Version 2.0 Chapter 2.
Chapter 3: Introducing the UML
OOD OO Design. OOD-2 OO Development Requirements Use case analysis OO Analysis –Models from the domain and application OO Design –Mapping of model.
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.
Basic Characteristics of Object-Oriented Systems
Unified Modeling Language. What is UML? Standard language for specifying, visualizing, constructing, and documenting the artifacts of software systems,
ITEC1301 Object-Oriented Systems Construction Lecture Notes #4 1.
UML Diagrams By Daniel Damaris Novarianto S..
Object-Oriented Analysis and Design
Department of Computer Science
Unified Modeling Language
UML Diagrams Jung Woo.
Interactions.
UML Overview Part 2.
Unified Modeling Language
Week 12: Activity & Sequence Diagrams
Presentation transcript:

UML Sequence Diagrams Michael L. Collard, Ph.D. Department of Computer Science Kent State University

2 Types of Diagrams Structural Diagrams – focus on static aspects of the software system –Class, Object, Component, Deployment Behavioral Diagrams – focus on dynamic aspects of the software system –Use-case, Interaction, State Chart, Activity

Kent State University3 Behavioral Diagrams Use Case Diagram – high-level behaviors of the system, user goals, external entities: actors Sequence Diagram – focus on time ordering of messages Collaboration Diagram – focus on structural organization of objects and messages State Chart Diagram – event driven state changes of system Activity Diagram – flow of control between activities

Kent State University4 Refining the Object Model Typically, only very simplistic object models can be directly derived from use cases. A better understanding of the behavior of each use case is necessary (i.e., analysis) Use interaction diagrams to specify and detail the behavior of use cases This helps to identify and refine key abstractions and relationships Operations, attributes, and messages are also identified during this process

Kent State University5 Interaction Diagrams There is one (or more) Interaction diagram per use case –Represent a sequence of interactions –Made up of objects, links, and messages Sequence diagrams –Models flow of control by time ordering –Emphasizes passing messages wrt time –Shows simple iteration and branching Collaboration diagrams –Models flow of control by organization –Structural relationships among instances in the interaction –Shows complex iteration and branching

Kent State University6 Example: Sequence Diagram

Kent State University7 Sequence Diagrams X-axis is objects –Object that initiates interaction is left most –Object to the right are increasingly more subordinate Y-axis is time –Messages sent and received are ordered by time Object life lines represent the existence over a period of time Activation (double line) is the execution of the procedure.

Kent State University8 Example: Sequence Diagram

Kent State University9 Message Passing Send – sends a signal (message) to an object Return – returns a value to a caller Call – invoke an operation Stereotypes – >

Kent State University10 Example: Sequence Diagram

Kent State University11 Example

Kent State University12 Properties of Sequence Diagrams Initiator is leftmost object (boundary object) Next is typically a control object Then comes entity objects

Kent State University13 Collaboration Diagrams Emphasizes the organization of the objects that participate in an interaction Classifier roles Association Messages, flow, and sequencing

Kent State University14 Example Collaboration Diagram

Kent State University15 Collaboration vs Sequence The two diagrams really show the same information Collaboration diagrams show more static structure (however, class diagrams are better at this) Sequence diagrams clearly highlight the orderings and very useful for multi- tasking

Kent State University16 Summary (Interaction Diagrams) Well structured interaction diagrams: –Is focused on communicating one aspect of a system’s dynamics –Contains only those elements that are essential to understanding –Is not so minimal that it misinforms the reader about the semantics that are important Diagrams should have meaningful names Layout diagram to minimize line crossings Use branching sparingly (leave for activity diagram)

Kent State University17 State Diagrams Finite state machines (i.e., automata, Mealy/Moore, state transition) Used to describe the behavior of one object (or sometimes an operator) for a number of scenarios that affect the object They are not good for showing interaction between objects (use interaction diagrams) Only use when the behavior of a object is complex and more detail is needed

Kent State University18 State Diagram Features Event – something that happens at a specific point –Alarm goes off Condition – something that has a duration –Alarm is on –Fuel level is low State – an abstraction of the attributes and relationships of an object (or system) –The fuel tank is in a too low level when the fuel level is below level x for n seconds

Kent State University19 Example: on/off Switch

Kent State University20 Using guards and actions trigger event guard action

Kent State University21 Activity Diagrams Special form of a state machine (flow chart) – intended to model computations and workflows States of the executing the computation not the states of an object Flow between activity states is caused by the end of a computation rather then an event

Kent State University22 Why Activity Diagrams Flowcharts (abet a bit glorified) are not very amiable to OO Not part of any previous notations Suitable for modeling the business activities OO and UML is becoming very prevalent in business applications Introduced to help sell products?

Kent State University23 Component Diagrams A component is a physical thing that conforms to and realizes a set of interfaces Bridge between logical and physical models Can represent object libraries, COM components, Java Beans, etc. Classes represent logical abstractions, components represent physical things that reside on a node (machine). Components are reachable only through interface

Kent State University24 Examples

Kent State University25 Deployment Diagrams Nodes are physical elements that represent a computational resource (machine) Association between nodes Components are allocated to nodes (one or more) Components represent the physical packaging of logical elements Nodes represent the physical deployment of components

Kent State University26 Example

Kent State University27 With Components

Kent State University28 Weather Station

Kent State University29 Modeling Source Code