Coming up: Interaction Diagrams Sequence Diagrams Dan Fleck.

Slides:



Advertisements
Similar presentations
Sequence Diagrams Dan Fleck.
Advertisements

ESE Einführung in Software Engineering 7. Modeling Behaviour Prof. O. Nierstrasz.
© 2006 ITT Educational Services Inc. SE350 System Analysis for Software Engineers: Unit 9 Slide 1 Appendix 3 Object-Oriented Analysis and Design.
Information System Design IT60105
1 Chapter 4 Dynamic Modeling and Analysis (Part I) Object-Oriented Technology From Diagram to Code with Visual Paradigm for UML Curtis H.K. Tsang, Clarence.
Sequence Diagrams. Introduction A Sequence diagram depicts the sequence of actions that occur in a system. The invocation of methods in each object, and.
1 Chapter 4 Dynamic Modeling and Analysis (Part I) Object-Oriented Technology From Diagram to Code with Visual Paradigm for UML Curtis H.K. Tsang, Clarence.
Interaction Diagrams Activity Diagram State Machine Diagram
2008/03/25 Unified Modeling Lanauage 1 Introduction to Unified Modeling Language (UML) – Part One Ku-Yaw Chang Assistant Professor.
Introduction to UML Part 2 Behavioral Modeling. Sequence (event) diagram Describes object interaction Typically captures behavior of a single use case.
Object Interaction Models - Review The use case and its scenarios serve as a vehicle for organizing the object interactions that take place. Each scenario.
Sequence Diagram. What is Sequence Diagram?  Sequence Diagram is a dynamic model of a use case, showing the interaction among classes during a specified.
7. 2Object-Oriented Analysis and Design with the Unified Process Objectives  Detailed Object-Oriented Requirements Definitions  System Processes—A Use.
Modern Systems Analysis and Design Fifth Edition Jeffrey A
System Analysis and Design
Analysis Modeling Dynamic Modeling. Requirements analysis Results in static and dynamic models – Scenario models: use cases (static), swimlane diagrams.
SE-565 Software System Requirements More UML Diagrams.
Object-oriented design Part 4: More UML. Interfaces An interface is a language construct specific to Java Java does not support multiple inheritance Interfaces.
Blaha and Rumbaugh Sections 7.2 and 8.2
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.
Coming up: Interaction Diagrams
Karolina Muszyńska Based on: S. Wrycza, B. Marcinkowski, K. Wyrzykowski „Język UML 2.0 w modelowaniu SI”
Sequence Diagram Tutorial
Chapter 8: Modelling Interactions and Behaviour UML Activity Diagram
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 25. Review Design Level Class Diagram Identifying classes/Operations/Attributes Associations – Simple associations.
Faculty of Computer & Information Software Engineering Third year
Dynamic Modeling Chapter 11 Part of Analysis Modeling Designing Concurrent, Distributed, and Real-Time Applications with UML Hassan Gomaa (2001)
UML January 26, 2011 CSE 403, Winter 2011, Brun UML Sequence Diagrams.
UML -Part 3. Dynamic Diagram Types Interaction Diagrams - Set of objects or roles and the messages that can be passed among them. – Sequence Diagrams.
7 Systems Analysis and Design in a Changing World, Fifth Edition.
1 A Student Guide to Object- Oriented Development Chapter 6 Identifying Functionality.
1 UML Sequence Diagrams UML Distilled, Third Edition, Chapter 4 M. Fowler.
Discovering object interaction. Use case realisation The USE CASE diagram presents an outside view of the system. The functionality of the use case is.
 C-style pointer-based arrays  Have great potential for errors and several shortcomings  C++ does not check whether subscripts fall outside the range.
Information Systems Engineering Interaction Diagrams: Sequence Diagram Collbortion Diagram.
1 An Introduction to UML Interaction (Sequence and Communication) Diagrams Georgia State University CIS 3300 Spring, 2009.
Course Instructor: Kashif Ihsan 1. Chapter # 3 2.
© 2008 Prentice Hall, Ovidiu Noran Lecture 7b 1 Modelling OO Logic Requirements: Sequence Diagrams and Activity Diagrams (Textbook Chapter 8, Appendix)
Interaction Diagrams Interaction Diagrams allow the designer to show how groups of objects collaborate in some behavior. –Interaction Diagrams will show.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour UML Sequence Diagram.
Sequence Diagrams And Collaboration Diagrams HungNM.
Design Jon Walker. More UML ● What is UML again?
Object Oriented Analysis and Design Sequence Diagrams.
CS 151: Object-Oriented Design September 5 Class Meeting Department of Computer Science San Jose State University Spring 2013 Instructor: Ron Mak
UNIFIED MODELING LANGUAGE(UML) BY Touseef Tahir Lecturer CS COMSATS Institute of Information Technology, Lahore.
System Sequence Diagram Chandan Rupakheti & Steve Chenoweth Week 5-3a.
CS212: Object Oriented Analysis and Design Lecture 34: UML Activity and Collaboration diagram.
Systems Analysis and Design in a Changing World, Fourth Edition
Information Systems Engineering Activity Diagram 1.
Coming up: Interaction Diagrams Sequence Diagrams Dan Fleck.
Coming up: Interaction Diagrams Sequence Diagrams Dan Fleck.
22 August, 2007Information System Design IT60105, Autumn 2007 Information System Design IT60105 Lecture 8 Use Case Diagrams.
Chapter 3: Introducing the UML
CSE 403 Lecture 8 UML Sequence Diagrams Reading: UML Distilled, Ch. 4, M. Fowler slides created by Marty Stepp
Use Case Diagrams. Introduction In the previous Lecture, you saw a brief review of the nine UML diagrams. Now that you have the clear, you'll start to.
Coming up: Interaction Diagrams
CompSci 280 S Introduction to Software Development
Systems Analysis and Design in a Changing World, Fourth Edition
Standard UML: Communication and Dynamic Behavior
UML SEQUENCE DIAGRAM.
Dynamic Modeling of Banking System Case Study - II
Prepared By Sidra Noureen
Analysis Modeling Dynamic Modeling.
Chapter 8: Modelling Interactions and Behaviour UML Activity Diagram
Business System Development
Object Oriented Analysis and Design
Superior University, Lahore
Interaction diagrams Interaction diagrams are models that describe how groups of objects collaborate in some behavior. Typically, an interaction diagram.
Software Engineering System Modeling Chapter 5 (Part 1) Dr.Doaa Sami
Appendix 3 Object-Oriented Analysis and Design
Presentation transcript:

Coming up: Interaction Diagrams Sequence Diagrams Dan Fleck

Coming up: Dynamic Diagram Types Interaction Diagrams UML Specifies a number of interaction diagrams to model dynamic aspects of the system Dynamic aspects of the system  Messages moving among objects/classes  Flow of control among objects  Sequences of events

Coming up: Sequence Diagrams Dynamic Diagram Types Interaction Diagrams - Set of objects or roles and the messages that can be passed among them.  Sequence Diagrams - emphasize time ordering  Communication Diagrams - emphasize structural ordering State Diagrams  State machine consisting of states, transitions, events and activities of an object Activity & Swimlane Diagrams  Emphasize and show flow of control among objects

Sequence Diagrams Describe the flow of messages, events, actions between objects Show concurrent processes and activations Show time sequences that are not easily depicted in other diagrams Typically used during analysis and design to document and understand the logical flow of your system Emphasis on time ordering!

Coming up: Components Sequence Diagram

Coming up: Components Sequence Diagram Time Increasing --> All lines should be horizontal to indicate instantaneous actions.Additionally if ActivityA happens before ActivityB, ActivityA must be above activity A Lower = Later!

Diagonal Lines What does this mean? :Student:Registration System GetDetails() Time=A Time=B Do you typically care?

Coming up: Components Components Objects: aStudent is a specific instance of the Student class Specific Instance of an Object Generic (unnamed) objects Generic (unnamed) objects of class type Seminar and Course

Coming up: Components Components lifeline execution

Coming up: Components Components Return value Method call

Coming up: Components: Guards Components c : Client : Transaction o : ODBCProxy create() setActions(a, b, c) setValues(a, 3, 4) setValues(b, c, 7) (committed) destroy() Synchronous message Asynchronous message create() destroy() Return message

Coming up: Components: option Components: alt/else

Coming up: Components: loop Components: option

Coming up: In class exercise Components: loop

Rules of thumb Rarely use options,loops,alt/else  These constructs complicate a diagram and make them hard to read/interpret.  Frequently it is better to create multiple simple diagrams Create sequence diagrams for use cases when it helps clarify and visualizae a complex flow Remember: the goal of UML is communication and understanding

Summary Sequence diagrams model object interactions with an emphasis on time ordering Method call lines  Must be horizontal!  Vertical height matters! “Lower equals Later”  Label the lines Lifeline – dotted vertical line Execution bar – bar around lifeline when code is running Arrows  Syncronous call (you’re waiting for a return value) – triangle arrow-head  Asyncronous call (not waiting for a return) – open arrow-head  Return call – dashed line Coming up: In class exercise

In class exercise Draw a sequence diagram for:  In Beauty and the Beast kitchen items came to life. Draw a sequence diagram for making a peanut butter and jelly sandwich if the following objects are alive: knife, peanut butter jar (and peanut butter), jelly jar (and jelly), bread, plate. I may or may not want the crusts cut off. Don’t forget to open and close things like the jars, and put yourself away, cleanup, etc…

Coming up: In class exercise In class exercise Draw a sequence diagram for:  Getting on a flight. Start at home, check in at the counter, go through security, and end up at the gate. (If you have time during the exercise, get yourself to your seat.) You may get searched in security

Coming up: References In class exercise Draw a sequence diagram for:  Getting money from our old friend the ATM machine Treat each part of the ATM as a class  Money dispenser  Screen  Keypad  Bank computer  Etc…

Coming up: References In class exercise Draw a sequence diagram for checking out a movie from the Red Box console at your local grocery store The main screen has options Rent and Return.  From the rent menu, one could browse the movies, select, and them to the cart.  To check out one should swipe the credit card and for security input the billing address zip code.  Charge the credit card  Print a receipt  Deliver the movie to the customer Return Option (and the movie is late):  Customer inserts the movie  A confirmation message will be displayed that says whether or not the return was successful.  The rental fee is for the movies to be returned the following day before 5 pm. After 5 pm, the credit card will be charged for another day rental. If it is late, a penalty would be assessed

Coming up: References References Example diagrams from: al/library/3101.html al/library/3101.html Also see Booch G.,The Unified Modeling Language User Guide, ch 19.