Sequence diagram E. Haodudin Nurkifli Teknik Informatika

Slides:



Advertisements
Similar presentations
PEMODELAN PERANGKAT LUNAK Sequence Diagram.  Merupakan suatu diagram interaksi yang memodelkan suatu skenario tunggal yang dijalankan pada sistem  Digunakan.
Advertisements

Interaction Diagram 1. Review Topik Use-case Inside view dari sistem digambarkan dengan diagram interaksi 2.
Ana M. Fernández  A UML diagram that depicts: ◦ interactions between objects. ◦ how the business currently works by showing how various.
Information System Design IT60105
Systems Analysis and Design in a Changing World, Fourth Edition
Summary Class responsibility cards can be used to help allocate responsibilities between different classes. The use of stereotype classes, such as entity,
THE OBJECT-ORIENTED DESIGN WORKFLOW UML2 Sequence Diagrams.
1 © Wolfgang Pelz UML2 UML Part Two. 2 © Wolfgang Pelz UML2 Chapters Four & Twelve Interaction Diagrams.
© 2005 Prentice Hall4-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
SE-565 Software System Requirements More UML Diagrams.
Sequence diagram example T120B029P pavasaris.
Karolina Muszyńska Based on: S. Wrycza, B. Marcinkowski, K. Wyrzykowski „Język UML 2.0 w modelowaniu SI”
State and Sequence Diagrams Modelling dynamic information So far we have seen: Use Case Diagrams – requirements capture, interface.
Sequence Diagram Tutorial
System Implementation System Implementation - Mr. Ahmad Al-Ghoul System Analysis and Design.
CS3773 Software Engineering
UML Collaboration Diagram. Recap System Sequence Diagrams (SSD) UML for SSD Examples.
BPMN By Hosein Bitaraf Software Engineering. Business Process Model and Notation (BPMN) is a graphical representation for specifying business processes.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour.
מידול התנהגותי 1. Today’s Session Sequence Diagrams State Machines 2.
1 CSC 450 Slides adapted from slides created by Robert B. France UML Behavioral Models.
UML / UML 2.0 Diagrams (Part III) 1. Sequence diagram is the most common kind of interaction diagram. It focuses on the message interchange between a.
1 SAD2 - UML 2 nd Lecture Sequence Diagram and other dynamic views Lecturer: Dr Dimitrios Makris
Introduction to Interaction Diagrams Used to illustrate the dynamic behaviour of a community of objects that collaborate by passing messages in order to.
Chapter 5 – System Modeling
1 Sequence Diagrams (Based on Stevens and Pooley (2006, Chapters 9, 10) and Fowler (2004, Chapter 4)) David Meredith Aalborg University.
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 9: Interaction.
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 UML Sequence Diagrams.
Chapter 4: UML Interaction Diagrams. Objective Provide a reference for frequently used UML interaction diagram notation- sequence and communication diagrams.
Chapter 2, Modeling with UML: UML 2 Hightlights
Activity diagrams. Introduction ● Activity diagrams are a behavioural model that represent the dynamics of the system. ● An activity diagram is essentially.
Collaboration Diagrams CSIS3600. What is a Collaboration Diagram Collaboration diagrams illustrate interactions between objects The collaboration diagram.
Smith’s Aerospace © P. Bailey & K. Vander Linden, 2005 Interaction and Communication Diagrams Patrick Bailey Keith Vander Linden Calvin College.
Saeed Ghanbartehrani Summer 2015 Lecture Notes #5: Programming Structures IE 212: Computational Methods for Industrial Engineering.
Discovering object interaction. Use case realisation The USE CASE diagram presents an outside view of the system. The functionality of the use case is.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour UML Sequence Diagram.
University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 communication and sequence diagrams : listCampaigns *[For.
Object-Oriented Analysis and Design 1 Mira Balaban & Arnon Sturm Object-Oriented Analysis and Design Session 3a: Behavioral Modeling - Interactions.
CSCI-383 Object-Oriented Programming & Design Lecture 12.
Karolina Muszyńska Based on: S. Wrycza, B. Marcinkowski, K. Wyrzykowski „Język UML 2.0 w modelowaniu SI”
CS212: Object Oriented Analysis and Design Lecture 34: UML Activity and Collaboration diagram.
Sections © Copyright by Pearson Education, Inc. All Rights Reserved.
© Bennett, McRobb and Farmer Object Interaction – Sequence Diagrams Based on Chapter 9 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis.
Chapter 3: Introducing the UML
More on UML 1. 1.Use-case diagram 2.Class diagram [Object diagram] (static) 1.1 Domain/analysis model – of reality 1.2 Design model – of decisions 3.
Project 2: Phase 1 Submission 7 Late submissions 10% 10 No submissions 14% Better than project 1 phase 3 submissions 10-point bonus: If you catch the deadline.
Basics of RSA Rational Software Architect. What is RSA? Comprehensive Modeling and Development environment that leverages the Unified Modeling Language.
UML Activity and Sequence Diagrams David Millard
Sequence diagrams Lecture 5. Main terms  Interaction  Life line  Activation  Executable behavior and derived behavior  Messages  Trajectory  Frame.
Cliquez pour modifier le style du titre Cliquez pour modifier les styles du texte du masque Deuxième niveau Troisième niveau Quatrième niveau Cinquième.
Systems Analysis and Design in a Changing World, Fourth Edition
Business System Development
Collaboration Diagrams
TIM 58 Chapter 6, continued: Behavioral Modeling
UML Interaction Diagrams
Chapter 11: Collaboration Diagram - PART1
Control Statements: Part 2
Prepared By Sidra Noureen
Sequence Diagram.
JavaScript: Control Statements.
UML Sequence Diagrams.
Object Oriented Analysis and Design
Requirements To Design In This Iteration
Princess Nourah bint Abdulrahman University
System Sequence Diagrams
IMAT5205 Systems Analysis and Design
Week 12: Activity & Sequence Diagrams
Marlon Dumas marlon.dumas ät ut . ee
Interaction Diagrams A Lot of UML!
UML Interaction diagrams
Presentation transcript:

Sequence diagram E. Haodudin Nurkifli Teknik Informatika Universitas Ahmad Dahlan Pertemuan : 6

Sequence Diagram Merupakan suatu diagram interaksi yang memodelkan suatu skenario tunggal yang dijalankan pada sistem Digunakan untuk memperlihatkan interaksi antar obyek dalam perintah yang berurut. Tujuan utama adalah mendefinisikan urutan kejadian yang dapat menghasilkan output yang diinginkan

Sequence Diagram Partisipan : obyek atau entitas yang bertindak dalam sequence diagram Message : komunikasi antar obyek partisipan Terdapat 2 tipe garis yaitu vertikal dan horisontal Vertikal : waktu  maju berdasarkan waktu Horisontal : obyek mana yang beraksi

Elemen Notasi Didefinisikan pada UML 2.0 Digambarkan dalam bentuk frame Bersifat optional untuk menggambarkan batas grafis suatu diagram.

Elemen Notasi (cont.) A sequence diagram that has incoming and outgoing messages

Elemen Notasi (Labeling) DiagramType DiagramName The UML specification provides specific text values for diagram types sd = Sequence Diagram, activity = Activity Diagram, use case = Use Case Diagram

Types of Interaction Creation Synchronous Asynchronous Reply Menunjukkan pesan yang menyebabkan terjadinya pembentukan instan obyek. Synchronous Pesan yang dikirim oleh 1 obyek ke obyek lain dan obyek pertama menunggu sampai hasil aksi selesai. Asynchronous Pesan yang dikirim oleh 1 obyek ke obyek lain dan obyek pertama tidak menunggu sampai hasil aksi selesai. Reply Menunjukkan nilai kembali dari obyek ke obyek yang megirim pesan Sumber : schaum outline

Guidelines for Building a UML Sequence Diagram Set the context (i.e. scope the system) Identify participating objects Draw arbitrary lifelines for each class Draw the duration of the objects on the class lifeline Insert the object messages from top to bottom of diagram (time-based) Check the diagram for completeness

Lifelines Elemen notasi lifeline terletak pada posisi atas diagram Represent either roles or object instances that participate in the sequence being modeled Standar penamaan lifeline : Instance Name : Class Name

Messages The first message of a sequence diagram always starts at the top and is typically located on the left side of the diagram for readability. Subsequent messages are then added to the diagram slightly lower then the previous message.

Message (cont.) the analyst object makes a call to the system object which is an instance of the ReportingSystem class. The analyst object is calling the system object's getAvailableReports method. The system object then calls the getSecurityClearance method with the argument of userId on the secSystem object, which is of the class type SecuritySystem the secSystem object returns userClearance to the system object when the getSecurityClearance method is called. The system object returns availableReports when the getAvailableReports method is called.

Message (cont.) the system object calling its determineAvailableReports method.

Message (cont.) Asynchronous Messages : digunakan pada proses konkurensi

Guards When modeling object interactions, there will be times when a condition must be met for a message to be sent to the object. the guard is the text "[pastDueBalance = 0]." By having the guard on this message, the addStudent message will only be sent if the accounts receivable system returns a past due balance of zero

Combined fragments (alternatives, options, and loops) A combined fragment is used to group sets of messages together to show conditional flow in a sequence diagram. The UML 2 specification identifies 11 interaction types for combined fragments.

Alternatives Alternatives are used to designate a mutually exclusive choice between two or more message sequences. Alternatives allow the modeling of the classic "if then else" logic e.g. if I buy three items, then I get 20% off my purchase; else I get 10% off my purchase.

Alternatives (cont.)

Option The option combination fragment is used to model a sequence that, given a certain condition, will occur; otherwise, the sequence does not occur. An option is used to model a simple "if then" statement (i.e., if there are fewer than five donuts on the shelf, then make two dozen more donuts).

Option (Cont.) if a student's past due balance equals zero, then the addStudent, getCostOfClass, and chargeForClass messages are sent. If the student's past due balance does not equal zero, then the sequence skips sending any of the messages in the option combination fragment.

Loops Occasionally you will need to model a repetitive sequence. In UML 2, modeling a repeating sequence has been improved with the addition of the loop combination fragment.

Loops (cont.)

Referencing another sequence diagram Starting in UML 2, the "Interaction Occurrence" element was introduced. Interaction occurrences add the ability to compose primitive sequence diagrams into complex sequence diagrams. The text "ref" is placed inside the frame's namebox, and the name of the sequence diagram being referenced is placed inside the frame's content area along with any parameters to the sequence diagram.

Interaction Occurrence

Interaction Occurrence (cont.)

Gates Gates can be an easy way to model the passing of information between a sequence diagram and its context. A gate is merely a message that is illustrated with one end connected to the sequence diagram's frame's edge and the other end connected to a lifeline

Gates (cont.)

Gates (cont.)

Break almost identical in every way to the option combined fragment, with two exceptions. a break's frame has a namebox with the text "break" instead of "option." when a break combined fragment's message is to be executed, the enclosing interaction's remainder messages will not be executed because the sequence breaks out of the enclosing interaction break combined fragment is much like the break keyword in a programming language like C++ or Java Breaks are most commonly used to model exception handling

Parallel When the processing time required to complete portions of a complex task is longer than desired, some systems handle parts of the processing in parallel The parallel combination fragment is drawn using a frame, and you place the text "par" in the frame's namebox break up the frame's content section into horizontal operands separated by a dashed line. Each operand in the frame represents a thread of execution done in parallel.

Parallel (cont.) A microwave is an example of an object that does two tasks in parallel

Summary The sequence diagram is a good diagram to use to document a system's requirements and to flush out a system's design. The reason the sequence diagram is so useful is because it shows the interaction logic between the objects in the system in the time order that the interactions take place.

References UML 2.0 Superstructure Final Adopted Specification UML 2 Sequence Diagram Overview UML 2 Tutorial

Try this yourself… Draw up a sequence diagram modelling the case when an advert campaign manager retrieves the details of a particular client’s advertising campaign and lists the details of a particular advert from the campaign. The sequence diagram should also show the case when a new advert is created. Only call messages (synchronous) should be used in this example and use any iteration conditions as you deem necessary. Objects to use: “CampainManager”, “Client”, “Campaign”, and “Advert”

A Solution to Previous Slide

Try this too… Create a sequence diagram modelling the behaviour of a PCB drilling machine. The machine will drill holes in a PCB of given dimensions at a set of given co- ordinates. Co-ordinates are given as a list, which must contain at least one set of co-ordinates. Drilling stops when the end of the list is reached or when a user interrupts the process.

A Solution to Previous Slide

Question