Classification of UML Diagrams

Slides:



Advertisements
Similar presentations
UML (Sequence Diagrams, Collaboration and State Chart Diagrams) Presentation By - SANDEEP REDDY CHEEDEPUDI (Student No: ) - VISHNU CHANDRADAS (Student.
Advertisements

Chapter 6: Behavioral Modeling
Systems Analysis and Design in a Changing World, Fourth Edition
L4-1-S1 UML Overview © M.E. Fayad SJSU -- CmpE Software Architectures Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I.
THE OBJECT-ORIENTED DESIGN WORKFLOW UML2 Sequence Diagrams.
Essentials of interaction diagrams Lecture Outline Collaborations Interaction on collaboration diagrams Sequence diagrams Messages from an object.
Dynamic modeling using UML
UML Sequence Diagrams Eileen Kraemer CSE 335 Michigan State University.
Lab 6 CPIT 250 System Analysis and Design.
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.
Unified Modeling Language
UML Sequence Diagrams Michael L. Collard, Ph.D. Department of Computer Science Kent State University.
Chapter 7: The Object-Oriented Approach to Requirements
UML for Java Programmers Object Mentor, Inc. Copyright  by Object Mentor, Inc All Rights Reserved
INFO 620Lecture #51 Information Systems Analysis and Design Sequence and Collaboration Diagrams INFO 620 Glenn Booker.
UML Collaboration Diagram. Recap System Sequence Diagrams (SSD) UML for SSD Examples.
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.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour.
Classification of UML Diagrams
1 On to Object Design Chapter 14 Applying UML and Patterns.
1 Modeling interactions and behavior Lecturer Dr. Mai Fadel.
UML diagrams What is UML UML diagrams –Static modeoing –Dynamic modeling 1.
Lecture 18: Object-Oriented Design – Interaction and State Diagrams Anita S. Malik Adapted from Schach (2004) Chapter 12.
ניתוח מערכות מידע 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.
Collaboration Diagrams CSIS3600. What is a Collaboration Diagram Collaboration diagrams illustrate interactions between objects The collaboration diagram.
Sequence diagram in UML Martin Palkovik. Sequence diagram  It is a graphic representation of system operations based on chronology - a time sequence.
An Introduction to the Unified Modeling Language
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.
Design Jon Walker. More UML ● What is UML again?
Object Oriented Analysis and Design Sequence Diagrams.
Introduction to UML CS A470. What is UML? Unified Modeling Language –OMG Standard, Object Management Group –Based on work from Booch, Rumbaugh, Jacobson.
Collaboration diagrams. Purpose A collaboration diagram is an alternate way to show a scenario. A collaboration diagram shows the objects and relationships.
CS212: Object Oriented Analysis and Design Lecture 34: UML Activity and Collaboration diagram.
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.
Systems Analysis and Design in a Changing World, Fourth Edition
Interaction Diagram An interaction diagram is a graphical representation of interactions between objects. Sequence diagram: shows the sequence in which.
Chapter 3: Introducing the UML
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.
7 Systems Analysis – ITEC 3155 The Object Oriented Approach – Use Cases.
Chapter 1 Overview of UML for Java Programmers. 2 Outline Diagram Types Diagram Types Class Diagrams Class Diagrams Object Diagrams Object Diagrams Sequence.
Systems Analysis and Design in a Changing World, Fourth Edition
UML Diagrams By Daniel Damaris Novarianto S..
Interactions.
Collaboration Diagrams
Evolution of UML.
Course Outcomes of Object Oriented Modeling Design (17630,C604)
Object-Oriented Analysis and Design
Sequence Diagrams.
Chapter 11: Collaboration Diagram - PART1
Unified Modeling Language
UML Diagrams Jung Woo.
Sequence Diagrams.
UML dynamic Modeling (Behavior Diagram)
Princess Nourah bint Abdulrahman University
Princess Nourah bint Abdulrahman University
Unified Modeling Language
CIS 375 Bruce R. Maxim UM-Dearborn
Unified Modelling Language
Interaction diagrams Interaction diagrams are models that describe how groups of objects collaborate in some behavior. Typically, an interaction diagram.
CIS 375 Bruce R. Maxim UM-Dearborn
Uml diagrams In ooad.
Chapter 4 Sequence Diagrams
Presentation transcript:

Classification of UML Diagrams

Behavioral and Structural Perspectives of Unified Modeling Language UML Any software system can have two aspects, static and dynamic. So a model is considered as complete when both the aspects are covered fully.

Structural Diagrams The structural diagrams represent the static aspect of the system. These static aspects represent those parts of a diagram which forms the main structure and therefore stable. Class Diagrams, Object Diagrams, Package Diagrams, Component Diagrams Deployment Diagrams

Behavioral Diagrams Behavioral diagrams basically capture the dynamic aspect of a system. Dynamic aspect can be described as the changing/moving parts of a system. Use case diagram Sequence diagram Collaboration diagram State chart diagram Activity diagram

Behavioral Diagram II Sequence Diagram

Interaction Diagrams One of the subsets of Behavioral diagrams Interaction diagrams graphically depicts the way objects interact with each other to give different behaviors. Interaction diagrams are sub classified into Sequence diagrams and Collaboration diagrams Sequence Diagrams are special type of Interaction Diagram which apart from graphically showing the object interaction specially focuses on the sequence and timing of interaction between the objects. Collaboration Diagrams are special type of Interaction diagrams which apart from graphically showing the object interaction focuses on the spatial distribution of the objects.

The Purposes of Interaction Diagrams The interactive behavior of the system is visualized . Visualizing interaction is a difficult task. So the solution is to use different types of models to capture the different aspects of the interaction. The purposes of interaction diagram To capture dynamic behavior of a system. To describe the message flow in the system. To describe structural organization of the objects. To describe interaction among objects.

Sequence Diagram A sequence diagram is an interaction diagram. The diagram deals with some sequences, which are the sequence of messages flowing from one object to another. Interaction among the components of a system is very important from the implementation and execution perspective. Sequence diagram is used to visualize the sequence of calls in a system to perform a specific functionality.

Objects, Lifelines, essages, and other odds and ends The objects and classes involved in the collaboration are shown at the top. We can distinguish objects from classes because objects have underlined names. The stick figure (actor) at left represents an anonymous object. It is the source and sink of all the messages entering and leaving the collaboration. Not all sequence diagrams have such an anonymous actor, but many do.

Objects, Lifelines, Messages, and Others The dashed lines hanging down from the objects and the actor are called lifelines. A message being sent from one object to another is shown as an arrow between the two lifelines. Each message is labeled with its name. Arguments appear either in the parentheses that follow the name, or next to data tokens (the little arrows with the circles on the end). Time is in the vertical dimension, so the lower a message appears the later it is sent.

Typical Sequence Diagram

Example: Creation and Destruction Creating an object. public class ShapeFactory { public Shape makeSquare() return new Square(); }

Example: Creation and Destruction Releasing an object to the garbage collector public class TreeMap { private TreeNode topNode; public void clear() topNode = nil; }

Simple Loops

Cases and Scenarios This sequence diagram is too complex

Sequence Diagram Constitution Rules Don't draw sequence diagrams like the diagram above. Nobody can read them. Nobody will read them. They're a huge waste of time. Learn how to draw a few smaller sequence diagrams that capture the essence of what you are trying to do. Each sequence diagram should fit on a single page, with plenty of room left for explanatory text.

public class Payroll{ private PayrollDB itsPayrollDB; private PayrollDisposition itsDisposition; public void doPayroll() { List employeeList = itsPayrollDB.getEmployeeList(); for (Iterator iterator = employeeList.iterator(); iterator.hasNext();) { String id = (String) iterator.next(); Employee e = ItsPayrollDB.getEmployee(id); if (e.isPayDay()) { double pay = e.calculatePay(); double deductions = e.calculateDeductions(); itsDisposition.sendPayment(pay - deductions); } } }} One small scenario

public class Payroll{ private PayrollDB itsPayrollDB; private PayrollDisposition itsDisposition; public void doPayroll() { List employeeList = itsPayrollDB.getEmployeeList(); for (Iterator iterator = employeeList.iterator(); iterator.hasNext();) { String id = (String) iterator.next(); Employee e = ItsPayrollDB.getEmployee(id); if (e.isPayDay()) { double pay = e.calculatePay(); double deductions = e.calculateDeductions(); itsDisposition.sendPayment(pay - deductions); } } }}

Advanced Concepts Loops and Conditions Sequence diagram with loops and conditions

Sequence Diagram with Loops and Conditions -I The payEmployee message is prefixed with a recurrence expression that looks like this: *[while id = idList.next()] The star tells us that this is an iteration; The message will be sent repeatedly until the guard expression in the square brackets is false.

Sequence Diagram with Loops and Conditions -II The payEmployee message terminates on an activation rectangle that is touching, but offset from, the first. This denotes that there are now two functions executing in the same object. Since the payEmployee message is recurrent, the second activation will also be recurrent, so all the messages depending from it will be part of the loop.

Sequence Diagram with Loops and Conditions -III Note the activation that is near the [payday] guard. This denotes an if statement. The second activation only gets control if the guard condition is true. If isPayDay returns true, then calculatePay, calculateDeductions, and sendPayment will be executed. Otherwise they won't.

Sending Messages to Interfaces We have created an AsynchronousLogger But we still want to show the application using only the Logger interface.

Behavioral Diagram III Collaboration Diagram

Collaboration Diagram Collaboration diagram is another form of interaction diagram. It represents the structural organization of a system and the messages sent/received. Structural organization consists of objects and links. The purpose of collaboration diagram is similar to sequence diagram. But the specific purpose of the collaboration diagram is to visualize the organization of objects and their interaction.

Collaboration Diagrams Collaboration diagrams contain the same information that sequence diagrams contain. Sequence diagrams make the order of the messages clear, Collaboration diagrams make the relationships between the objects clear

Collaboration Diagram A link exists wherever one object can send a message to another. Traveling over those links are the messages themselves. The messages are labeled with the name of the message, its sequence number, and any guards that apply. The dot structure of the sequence number shows the calling hierarchy. The TreeMap.add function invokes the TreeMapNode.add function (message 1.1). Message 1.1 is the first message sent by the function invoked by message 1.

Sequence and Collaboaration Diagrams For the Same Example

Behavioral Diagram IV State Diagram

State Diagrams There are two states named Locked and Unlocked. Two events may be sent to the machine. The coin event means that the user has dropped a coin into the turnstile. The pass event means that the user has passed through the turnstile. The arrows are called transitions. They are labeled with the event that triggers the transition and the action that the transition performs. When a transition is triggered it causes the state of the system to change.

State Diagram Example If we are in the Locked state and we get a coin event, then we transition to the Unlocked state and we invoke the Unlock function. If we are in the Unlocked state and we get a pass event, then we transition to the Locked state and we invoke the Lock function. If we are in the Unlocked state and we get a coin event, then we stay in the Unlocked state and we call the Thankyou function. If we are in the Locked state and we get a pass event, then we stay in the Locked state and we call the Alarm function.