Applying UML & Patterns (3 rd ed.) Chapter 15

Size: px
Start display at page:

Download "Applying UML & Patterns (3 rd ed.) Chapter 15"

Transcription

1 Applying UML & Patterns (3 rd ed.) Chapter 15 UML INTERACTION DIAGRAMS This document may not be used or altered without the express permission of the author. Dr. Glenn L. Ray School of Information Sciences University of Pittsburgh

2 Fig : A myb : B doone dotwo dothree Sequence diagram s fence format Time is increasing in the downward direction 2

3 Fig 15.1 : A myb : B doone dotwo dothree public class A { private B myb = new B(); } public void doone() { myb.dotwo(); myb.dothree(); } 3

4 Fig doone : A 1: dotwo 2: dothree myb : B Same collaboration using communication diagram Uses network (or graph) format 4

5 Interaction Diagrams Sequence vs. Communication diagrams Sequence Diagrams Easier to see sequence of method calls over time More expressive UML notation Better support from many tools Communication Diagrams Better fit on limited space (page or whiteboard) Easier to edit/amend Look more like class diagram 5

6 Fig : Register : Sale makepayment(cashtendered) makepayment(cashtendered) create(cashtendered) : Payment 1. Someone(?) sends makepayment(..) msg to Register 2. Register sends makepayment(..) msg to Sale 3. Sale creates an instance of Payment Who created Register & Sale? IDs show a fragment of system behavior during isolated snapshot in time. This can be confusing and lead to modeling errors/omissions! 6

7 Fig direction of message makepayment(cashtendered) :Register 1: makepayment(cashtendered) :Sale 1.1: create(cashtendered) :Payment Same collaboration using communication diagram 7

8 Interaction Diagrams Essential UML models for OOAD 1. Use cases Functional requirements 2. Class diagram Objects with knowledge (attributes) and behavior (operations) Static relationships between objects 3. Interaction diagrams Dynamic collaboration between objects 8

9 Fig lifeline box representing an unnamed instance of class Sale lifeline box representing a named instance lifeline box representing the class Font, or more precisely, that Font is an instance of class Class an instance of a metaclass :Sale s1 : Sale «metaclass» Font lifeline box representing an instance of an ArrayList class, parameterized (templatized) to hold Sale objects lifeline box representing one instance of class Sale, selected from the sales ArrayList <Sale> collection List is an interface in UML 1.x we could not use an interface here, but in UML 2, this (or an abstract class) is legal sales: ArrayList<Sale> sales[ i ] : Sale x : List related example 9

10 Interaction Diagrams UML expression syntax Don t have to use full syntax in all cases return = msgname(param:paramtype1, ) : returntype 10

11 Fig dox : Register doa : Store 1 the 1 implies this is a Singleton, and accessed via the Singleton pattern Notation for Singleton 11

12 Fig : Register : Sale dox doa a found message whose sender will not be specified dob doc dod execution specification bar indicates focus of control typical sychronous message shown with a filled-arrow line 12

13 Fig : Register : Sale dox More common return syntax d1 = getdate getdate adate A return from method call, usually considered optional Overuse clutters diagram! 13

14 Fig : Register dox clear Objects commonly invoke their own methods 14

15 Fig : Register : Sale note that newly created objects are placed at their creation "height" makepayment(cashtendered) create(cashtendered) : Payment authorize Dashed line for create really not needed, though its now official UML Use create for calls to a constructor 15

16 Fig : Sale create(cashtendered)... «destroy» : Payment X the «destroy» stereotyped message, with the large X and short lifeline indicates explicit object destruction Usually not necessary for languages with automatic garbage collection (e.g., Java) 16

17 Fig : A : B makenewsale a UML loop frame, with a boolean guard expression loop [ more items ] enteritem(itemid, quantity) description, total endsale UML Loop frame 17

18 Fig : Foo : Bar xx opt [ color = red ] calculate yy UML 2 frame showing an optional message 18

19 Fig : Foo : Bar xx [ color = red ] calculate yy The same ID using pre-uml 2 notation Guards must evaluate to true for the message to be sent 19

20 Fig : A : B : C dox alt [ x < 10 ] calculate [ else ] calculate Alt frame show mutually exclusive interactions 20

21 Fig t = gettotal lineitems[i] : : Sale SalesLineItem This lifeline box represents one instance from a collection of many SalesLineItem objects. loop [ i < lineitems.size ] i++ st = getsubtotal lineitems[i] is the expression to select one element from the collection of many SalesLineItems; the i value refers to the same i in the guard in the LOOP frame an action box may contain arbitrary language statements (in this case, incrementing i ) it is placed over the lifeline to which it applies Technique for looping over a collection Loop details are explicit; diagram more cluttered Note Java code on p. 234 showing new for loop syntax 21

22 Fig : Sale lineitems[i] : SalesLineItem t = gettotal loop st = getsubtotal A 2 nd technique for looping Loop details are implicit; diagram less cluttered 22

23 Fig : Foo : Bar xx opt [ color = red ] loop(n) calculate A loop frame nested within an optional frame 23

24 Fig SD can contain frames that Reference other SDs : A : B : C sd AuthenticateUser : B : C dox doa authenticate(id) ref dob AuthenticateUser authenticate(id) dom1 dom2 ref DoFoo sd DoFoo : B : C interaction occurrence note it covers a set of lifelines note that the sd frame it relates to has the same lifelines: B and C dox doy doz 24

25 Fig message to class, or a static method call dox : Foo 1: locs = getavailablelocales «metaclass» Calendar Call to a static class method Notice there is no implied instance to the Calendar class ( : is omitted) 25

26 Fig Payment is an abstract superclass, with concrete subclasses that implement the polymorphic authorize operation Payment {abstract} authorize() {abstract}... CreditPayment authorize()... DebitPayment authorize()... polymorphic message object in role of abstract superclass :Register :Payment {abstract} dox authorize stop at this point don t show any further details for this message :DebitPayment :Foo :CreditPayment :Bar authorize doa authorize dox dob separate diagrams for each polymorphic concrete case Polymorphic method calls 26

27 Fig a stick arrow in UML implies an asynchronous call a filled arrow is the more common synchronous call In Java, for example, an asynchronous call may occur as follows: // Clock implements the Runnable interface Thread t = new Thread( new Clock() ); t.start(); the asynchronous start call always invokes the run method on the Runnable (Clock) object to simplify the UML diagram, the Thread object and the start message may be avoided (they are standard overhead ); instead, the essential detail of the Clock creation and the run message imply the asynchronous call startclock Active objects run in their own thread :ClockStarter create run active object runfinalization :Clock System : Class Solid vs. stick arrowheads easily confused when sketching models See Java code p

28 Fig UML for Communication Diagrams.. 1: makepayment(cashtendered) 2: foo : Register :Sale 2.1: bar link line A link is to objects as an association is to classes A link is an instance of an association 28

29 Fig msg1 1: msg2 2: msg3 3: msg4 : Register :Sale 3.1: msg5 all messages flow on the same link Link does not show directionality that is indicated by each msg 29

30 Fig A message to this msg1 : Register 1: clear 30

31 Fig Three ways to show creation in a communication diagram create message, with optional initializing parameters. This will normally be interpreted as a constructor call. Simplest & most common 1: create(cashier) : Register :Sale 1: create(cashier) : Register :Sale {new} «create» 1: make(cashier) : Register :Sale if an unobvious creation message name is used, the message may be stereotyped for clarity 31

32 Fig msg1 : A 1: msg2 : B not numbered 1.1: msg3 legal numbering : C Message numbering can be tricky to follow 32

33 Fig first second third msg1 : A 1: msg2 : B 1.1: msg3 2.1: msg5 2: msg4 : C fourth 2.2: msg6 fifth Complex message numbering sixth : D 33

34 Fig conditional message, with test message1 1 [ color = red ] : calculate : Foo : Bar Conditional message with guard 34

35 Fig unconditional after either msg2 or msg4 : E 1a and 1b are mutually exclusive conditional paths 2: msg6 msg1 1a [test1] : msg2 : A : B 1b [not test1] : msg4 1a.1: msg3 : D 1b.1: msg5 : C Mutually exclusive conditional messages 35

36 Fig runsimulation : Simulator 1 * [ i = 1..n ]: num = nextint : Random iteration is indicated with a * and an optional iteration clause following the sequence number Iteration/looping 36

37 Fig t = gettotal : Sale 1 * [i = 1..n]: st = getsubtotal lineitems[i]: SalesLineItem this iteration and recurrence clause indicates we are looping across each element of the lineitems collection. This lifeline box represents one instance from a collection of many SalesLineItem objects. lineitems[i] is the expression to select one element from the collection of many SalesLineItems; the i value comes from the message clause. t = gettotal : Sale 1 *: st = getsubtotal lineitems[i]: SalesLineItem Less precise, but usually good enough to imply iteration across the collection members Iteration over a collection 37

38 Fig message to class, or a static method call dox : Foo 1: locs = getavailablelocales «metaclass» Calendar Static method call or message to a class 38

39 Fig polymorphic message stop at this point don t show any further details for this message dox :Register authorize :Payment {abstract} object in role of abstract superclass authorize authorize :DebitPayment doa dob :Foo :CreditPayment dox :Bar separate diagrams for each polymorphic concrete case Polymorphic messages 39

40 Fig startclock :ClockStarter 3: runfinalization System : Class :Clock 1: create 2: run asynchronous message active object Asychronous calls 40

Chapter 15 UML Interaction Diagrams. Larman, C. Applying UML and Patterns. 3rd Ed. Ed. Prentice-Hall: 2005.

Chapter 15 UML Interaction Diagrams. Larman, C. Applying UML and Patterns. 3rd Ed. Ed. Prentice-Hall: 2005. Chapter 15 UML Interaction Diagrams Larman, C. Applying UML and Patterns. 3rd Ed. Ed. Prentice-Hall: 2005. Fig. 15.1 : A myb : B doone dotwo dothree Fig. 15.2 doone : A 1: dotwo 2: dothree myb : B Fig.

More information

Design. Furthermore, it is natural to discover and change some requirements during the design and implementation work of the early iterations.

Design. Furthermore, it is natural to discover and change some requirements during the design and implementation work of the early iterations. Design Design Iteratively Do the Right Thing, Do the Thing Right. The requirements and object-oriented analysis has focused on learning to do the right thing By contrast, the design work will stress do

More information

Modeling Dynamic Behavior

Modeling Dynamic Behavior Dr. Michael Eichberg Software Engineering Department of Computer Science Technische Universität Darmstadt Software Engineering Modeling Dynamic Behavior The following slides use material from: Craig Larman;

More information

COMP 354: INTRODUCTION TO SOFTWARE ENGINEERING

COMP 354: INTRODUCTION TO SOFTWARE ENGINEERING COMP 354: INTRODUCTION TO SOFTWARE ENGINEERING Introduction to UML d_sinnig@cs.concordia.ca Department for Computer Science and Software Engineering 28-May-14 Unified Modeling Language Structural Diagrams

More information

Modeling Dynamic Behavior

Modeling Dynamic Behavior Dr. Michael Eichberg Software Engineering Department of Computer Science Technische Universität Darmstadt Software Engineering Modeling Dynamic Behavior The following slides use material from: Craig Larman;

More information

Introduction to Software Engineering (2+1 SWS) Winter Term 2009 / 2010 Dr. Michael Eichberg Vertretungsprofessur Software Engineering Department of

Introduction to Software Engineering (2+1 SWS) Winter Term 2009 / 2010 Dr. Michael Eichberg Vertretungsprofessur Software Engineering Department of Introduction to Software Engineering (2+1 SWS) Winter Term 2009 / 2010 Dr. Michael Eichberg Vertretungsprofessur Software Engineering Department of Computer Science Technische Universität Darmstadt Dr.

More information

Sequence Diagram. A UML diagram used to show how objects interact. Example:

Sequence Diagram. A UML diagram used to show how objects interact. Example: Sequence Diagram A UML diagram used to show how objects interact. Example: r: Register s: Sale makepayment() makepayment() new() : Payment The above starts with a Register object, r, receiving a makepayment

More information

UML Behavioral Models

UML Behavioral Models UML Behavioral Models Dept. of Computer Science Baylor University Some slides adapted from materials in the following sources: UMLTutorial by Dr. R. France, Lecture slides by Dr. C. Constantinides Specifying

More information

Sequence Diagram. r: Register s: Sale

Sequence Diagram. r: Register s: Sale ACS-3913 1 Sequence Diagram A UML diagram used to show how objects interact. Example: r: Register s: Sale makepayment() makepayment() new() : Payment The above starts with a Register object, r, receiving

More information

OO Design2. Design Artifacts

OO Design2. Design Artifacts OO Design2 POS example - revisited LAR Ch 8 has entire POS design explained READ THIS CHAPTER and ASK Q s in class Design class diagrams Kinds of visibility of objects to one another Navigability of associations

More information

Chapter 3: Object Oriented Design

Chapter 3: Object Oriented Design Chapter 3: Object Oriented Design Object Oriented Design The boundaries between analysis and design are fuzzy, although the focus of each is quite distinct. In analysis, the focus is to fully analyze the

More information

Design Engineering. Overview

Design Engineering. Overview Design Engineering Overview What is software design? How to do it? Principles, concepts, and practices High-level design Low-level design N. Meng, B. Ryder 2 1 Design Engineering The process of making

More information

Software Modeling & Analysis

Software Modeling & Analysis Software Modeling & Analysis OOPT (Object Oriented Process with Trace) Lecturer: JUNBEOM YOO jbyoo@konkuk.ac.kr What is OOPT? OOPT (Object Oriented Process with Trace) A software process based on RUP Revision

More information

Object-Interaction Diagrams: Sequence Diagrams UML

Object-Interaction Diagrams: Sequence Diagrams UML Object-Interaction Diagrams: Sequence Diagrams UML Communication and Time In communication diagrams, ordering of messages is achieved by labelling them with sequence numbers This does not make temporal

More information

What is a Class Diagram? A diagram that shows a set of classes, interfaces, and collaborations and their relationships

What is a Class Diagram? A diagram that shows a set of classes, interfaces, and collaborations and their relationships Class Diagram What is a Class Diagram? A diagram that shows a set of classes, interfaces, and collaborations and their relationships Why do we need Class Diagram? Focus on the conceptual and specification

More information

What is a Class Diagram? Class Diagram. Why do we need Class Diagram? Class - Notation. Class - Semantic 04/11/51

What is a Class Diagram? Class Diagram. Why do we need Class Diagram? Class - Notation. Class - Semantic 04/11/51 What is a Class Diagram? Class Diagram A diagram that shows a set of classes, interfaces, and collaborations and their relationships Why do we need Class Diagram? Focus on the conceptual and specification

More information

Sequence Diagrams. Massimo Felici. Massimo Felici Sequence Diagrams c

Sequence Diagrams. Massimo Felici. Massimo Felici Sequence Diagrams c Sequence Diagrams Massimo Felici What are Sequence Diagrams? Sequence Diagrams are interaction diagrams that detail how operations are carried out Interaction diagrams model important runtime interactions

More information

References: Applying UML and patterns Craig Larman

References: Applying UML and patterns Craig Larman References: Applying UML and patterns Craig Larman 1 2 What are patterns? Principles and solutions codified in a structured format describing a problem and a solution A named problem/solution pair that

More information

Constantinos Constantinides Computer Science and Software Engineering Concordia University Montreal, Canada

Constantinos Constantinides Computer Science and Software Engineering Concordia University Montreal, Canada 1 Disclaimer: These slides are based on the 2 nd edition of Applying UML and Patterns; An introduction to OOAD and the Unified process by Craig Larman (2002). I take responsibility for any errors. Constantinos

More information

Designing for Visibility & Mapping to Code CSSE 574: Session 4, Part 3

Designing for Visibility & Mapping to Code CSSE 574: Session 4, Part 3 Designing for Visibility & Mapping to Code CSSE 574: Session 4, Part 3 Steve Chenoweth Phone: Office (812) 877-8974 Cell (937) 657-3885 Email: chenowet@rose-hulman.edu Agenda Designing for Visibility Mapping

More information

COMP 6471 Software Design Methodologies

COMP 6471 Software Design Methodologies COMP 6471 Software Design Methodologies Fall 2011 Dr Greg Butler http://www.cs.concordia.ca/~gregb/home/comp6471-fall2011.html Page 2 Sample UP Artifact Relationships Domain Model Context Business Modeling

More information

Mapping Designs to Code

Mapping Designs to Code Mapping Designs to Code Creating Class Definitions from DCDs public class SalesLineItem private int quantity; private ProductDescription description ; public SalesLineItem(ProductDescription desc, int

More information

Class diagrams. Modeling with UML Chapter 2, part 2. Class Diagrams: details. Class diagram for a simple watch

Class diagrams. Modeling with UML Chapter 2, part 2. Class Diagrams: details. Class diagram for a simple watch Class diagrams Modeling with UML Chapter 2, part 2 CS 4354 Summer II 2015 Jill Seaman Used to describe the internal structure of the system. Also used to describe the application domain. They describe

More information

ADVANCED SOFTWARE DESIGN LECTURE 7 GRASP

ADVANCED SOFTWARE DESIGN LECTURE 7 GRASP ADVANCED SOFTWARE DESIGN LECTURE 7 GRASP Dave Clarke 1 TODAY S LECTURE We will discuss 7 of the GRASP design patterns cohesion and coupling were covered earlier. These provide principles for evaluating

More information

Object-Oriented Modeling. Sequence Diagram. Slides accompanying Version 1.0

Object-Oriented Modeling. Sequence Diagram. Slides accompanying Version 1.0 Object-Oriented Modeling Sequence Diagram Slides accompanying UML@Classroom Version 1.0 Business Informatics Group Institute of Software Technology and Interactive Systems Vienna University of Technology

More information

Lecture 21 Detailed Design Dynamic Modeling with UML

Lecture 21 Detailed Design Dynamic Modeling with UML Lecture 21 Detailed Design Dynamic Modeling with UML Software Engineering ITCS 3155 Fall 2008 Dr. Jamie Payton Department of Computer Science University of North Carolina at Charlotte November 18, 2008

More information

CS 370 REVIEW: UML Diagrams D R. M I C H A E L J. R E A L E F A L L

CS 370 REVIEW: UML Diagrams D R. M I C H A E L J. R E A L E F A L L CS 370 REVIEW: UML Diagrams D R. M I C H A E L J. R E A L E F A L L 2 0 1 5 Introduction UML Unified Modeling Language Very well recognized specification for modeling architectures, use cases, etc. UML

More information

Responsibilities. Using several specific design principles to guide OO design decisions.

Responsibilities. Using several specific design principles to guide OO design decisions. Designing Objects with Responsibilities Using several specific design principles to guide OO design decisions. Challenge Old-school advice on OOD After identifying i your requirements and creating a domain

More information

Interaction Modelling: Sequence Diagrams

Interaction Modelling: Sequence Diagrams Interaction Modelling: Sequence Diagrams Fabrizio Maria Maggi Institute of Computer Science (these slides are derived from the book Object-oriented modeling and design with UML ) Interaction Modelling

More information

UML Sequence Diagrams

UML Sequence Diagrams UML Sequence Diagrams Prof. Dr. Eric Dubuis Berner Fachhochschule, @ Biel Course "UML and Design Patterns" of module "Software Engineering and Design", version October 2008 BFH/TI/Software Engineering

More information

Unified Modeling Language (UML) Object Diagram and Interaction Diagrams

Unified Modeling Language (UML) Object Diagram and Interaction Diagrams 1 / 17 Unified Modeling Language (UML) and Miaoqing Huang University of Arkansas Spring 2010 2 / 17 Outline 1 2 3 / 17 Outline 1 2 4 / 17 A snapshot of the objects in a system at a point in time Object:

More information

Use Case Sequence Diagram. Slide 1

Use Case Sequence Diagram. Slide 1 Use Case Sequence Diagram Slide 1 Interaction Diagrams l Interaction diagrams model the behavior of use cases by describing the way groups of objects interact to complete the task of the use case. They

More information

CTIS 359 Principles of Software Engineering SOFTWARE DESIGN OO(A)D

CTIS 359 Principles of Software Engineering SOFTWARE DESIGN OO(A)D CTIS 359 Principles of Software Engineering SOFTWARE DESIGN OO(A)D Today s Objectives To explain the basic concepts of OO(A)D To describe some best practices regarding to OO(A)D What is NOT UML? The UML

More information

CSE 308. UML Sequence Diagrams. Reading / Reference.

CSE 308. UML Sequence Diagrams. Reading / Reference. CSE 308 UML Sequence Diagrams Reading Reading / Reference www.ibm.com/developerworks/rational/library/3101.html Reference www.visual-paradigm.com/vpgallery/diagrams/sequence.html 2 1 Interaction Diagrams

More information

Unified Modeling Language (UML) and Modeling

Unified Modeling Language (UML) and Modeling LECTURE-11 Unified Modeling Language (UML) and Modeling UML is a graphical notation useful for OO analysis and design Allows representing various aspects of the system Various notations are used to build

More information

The learning objectives of this chapter are the followings. At the end of this chapter, you shall

The learning objectives of this chapter are the followings. At the end of this chapter, you shall Chapter 5 Sequence diagrams In the previous chapters, we have seen different diagrams. Use case diagrams describe tasks that a system is supposed to perform. It gives high-level information about how a

More information

Unified Modeling Language

Unified Modeling Language Unified Modeling Language Software technology Szoftvertechnológia Dr. Balázs Simon BME, IIT Outline UML Diagrams: Sequence Diagram Communication Diagram Interaction Overview Diagram Dr. Balázs Simon, BME,

More information

Object Interaction Sequence Diagrams

Object Interaction Sequence Diagrams Object Interaction Sequence Diagrams Based on Chapter 9 Bennett, McRobb and Farmer Object Oriented Systems Analysis and Design Using UML 4 th Edition, McGraw Hill, 2010 2010 Bennett, McRobb and Farmer

More information

UML Fundamental. OutLine. NetFusion Tech. Co., Ltd. Jack Lee. Use-case diagram Class diagram Sequence diagram

UML Fundamental. OutLine. NetFusion Tech. Co., Ltd. Jack Lee. Use-case diagram Class diagram Sequence diagram UML Fundamental NetFusion Tech. Co., Ltd. Jack Lee 2008/4/7 1 Use-case diagram Class diagram Sequence diagram OutLine Communication diagram State machine Activity diagram 2 1 What is UML? Unified Modeling

More information

Download FirstOODesignPractice from SVN. A Software Engineering Technique: (Class Diagrams)

Download FirstOODesignPractice from SVN. A Software Engineering Technique: (Class Diagrams) Download FirstOODesignPractice from SVN A Software Engineering Technique: (Class Diagrams) public class TicTacToe { private final int rows; private final int columns; private String[][] board; /** * Constructs

More information

Object Oriented Methods with UML. Lecture -4

Object Oriented Methods with UML. Lecture -4 Object Oriented Methods with UML Lecture -4 Topics Class diagram with sample code Interaction diagram Sequence Diagram Collaboration Diagram Class Diagram with sample code +name: char #email: char #CNumber:

More information

Assigning Responsibilities (Patterns of Responsibility Assignment Principles: GRASP)

Assigning Responsibilities (Patterns of Responsibility Assignment Principles: GRASP) Subsystem design basics Assigning Responsibilities (Patterns of Responsibility Assignment Principles: GRASP) Dept. of Computer Science Baylor University Focus on modeling how subsystems accomplish goals

More information

Object-oriented design. More UML

Object-oriented design. More UML Object-oriented design More UML Interfaces An interface is a language construct specific to Java Java does not support multiple inheritance Interfaces provide some of the same functionality A Java class

More information

Some Software Engineering Techniques (Class Diagrams and Pair Programming)

Some Software Engineering Techniques (Class Diagrams and Pair Programming) Some Software Engineering Techniques (Class Diagrams and Pair Programming) } Programs typically begin as abstract ideas } These ideas form a set of abstract requirements } We must take these abstract requirements,

More information

CSSE 374: Design Class Diagrams. Shawn Bohner Office: Moench Room F212 Phone: (812)

CSSE 374: Design Class Diagrams. Shawn Bohner Office: Moench Room F212 Phone: (812) CSSE 374: Design Class Diagrams Shawn Bohner Office: Moench Room F22 Phone: (82) 877-8685 Email: bohner@rose-hulman.edu General solutions get you a 50% tip Plan for the Day Pre-break course evaluations

More information

Interactions A link message

Interactions A link message Interactions An interaction is a behavior that is composed of a set of messages exchanged among a set of objects within a context to accomplish a purpose. A message specifies the communication between

More information

LABORATORY 1 REVISION

LABORATORY 1 REVISION UTCN Computer Science Department Software Design 2012/2013 LABORATORY 1 REVISION ================================================================== I. UML Revision This section focuses on reviewing the

More information

Unified Modeling Language (UML)

Unified Modeling Language (UML) 1 / 45 Unified Modeling Language (UML) Miaoqing Huang University of Arkansas 2 / 45 Outline 1 Introduction 2 Use Case Diagram 3 Class Diagram 4 Sequence Diagram 3 / 45 Outline 1 Introduction 2 Use Case

More information

Lecture 17: (Architecture V)

Lecture 17: (Architecture V) Lecture 17: (Architecture V) Software System Design and Implementation ITCS/ITIS 6112/8112 091 Fall 2008 Dr. Jamie Payton Department of Computer Science University of North Carolina at Charlotte Oct. 30,

More information

UML Sequence Diagrams for Process Views

UML Sequence Diagrams for Process Views UML Sequence Diagrams for Process Views With some material from MartyStepp lectures, Wi07. Outline UML class diagrams recap UML sequence diagrams UML wrapup More detail: http://dn.codegear.com/article/31863#sequence-diagrams

More information

UML (Unified Modeling Language)

UML (Unified Modeling Language) UML (Unified Modeling Language) UML Outline Software Institute of Nanjing University 2009 Instructor 刘嘉 (Liu Jia) Email : liujia@software.nju.edu.cn ext : 509 Office : 705 2 References [1] The Unified

More information

Syllabus & Curriculum for Certificate Course in Java. CALL: , for Queries

Syllabus & Curriculum for Certificate Course in Java. CALL: , for Queries 1 CONTENTS 1. Introduction to Java 2. Holding Data 3. Controllin g the f l o w 4. Object Oriented Programming Concepts 5. Inheritance & Packaging 6. Handling Error/Exceptions 7. Handling Strings 8. Threads

More information

Chapter 2: The Object-Oriented Design Process

Chapter 2: The Object-Oriented Design Process Chapter 2: The Object-Oriented Design Process In this chapter, we will learn the development of software based on object-oriented design methodology. Chapter Topics From Problem to Code The Object and

More information

Software Specification 2IX20

Software Specification 2IX20 Software Specification 2IX20 Julien Schmaltz (slides from A. Serebrenik) Lecture 05: Interaction diagrams / Sequence diagrams This week sources Slides by Site by David Meredith, Aalborg University, DK

More information

Chapter 10. Object-Oriented Analysis and Modeling Using the UML. McGraw-Hill/Irwin

Chapter 10. Object-Oriented Analysis and Modeling Using the UML. McGraw-Hill/Irwin Chapter 10 Object-Oriented Analysis and Modeling Using the UML McGraw-Hill/Irwin Copyright 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Objectives 10-2 Define object modeling and explain

More information

Advanced Interaction

Advanced Interaction 8 Advanced nteraction Modeling The interaction model has several advanced features that can be helpful. You can skip this chapter on a first reading of the book. 8.1 Use Case Relationships ndependent use

More information

From designing to coding

From designing to coding From designing to coding l st step: sensibly split work among team members Choose splits along thin interfaces l Probably not equal parts; split biggest parts again later Formalize the interfaces think

More information

Engineering Design w/embedded Systems

Engineering Design w/embedded Systems 1 / 40 Engineering Design w/embedded Systems Lecture 33 UML Patrick Lam University of Waterloo April 4, 2013 2 / 40 What is UML? Unified Modelling Language (UML): specify and document architecture of large

More information

Introduction to UML Diagrams

Introduction to UML Diagrams Bern University of Applied Sciences H T I Bienne Department I Basic Programming Introduction to UML Diagrams J.-P. Dubois Content State Machine Diagrams Class Diagrams Object Diagrams Sequence Diagrams

More information

Introduction to Software Engineering (2+1 SWS) Winter Term 2009 / 2010 Dr. Michael Eichberg Vertretungsprofessur Software Engineering Department of

Introduction to Software Engineering (2+1 SWS) Winter Term 2009 / 2010 Dr. Michael Eichberg Vertretungsprofessur Software Engineering Department of Introduction to Software Engineering (2+1 SWS) Winter Term 2009 / 2010 Dr. Michael Eichberg Vertretungsprofessur Software Engineering Department of Computer Science Technische Universität Darmstadt What

More information

KF5008 Program Design & Development. Lecture 3 Sequence Diagrams

KF5008 Program Design & Development. Lecture 3 Sequence Diagrams KF5008 Program Design & Development Lecture 3 Sequence Diagrams Learning Outcomes At the end of the lecture, you should be able to: Explain the content and purpose of a UML Sequence Diagram Describe the

More information

UML REFERENCE SHEETS. 2013, 2014 Michael Marking; all rights reserved, including moral rights. Web site:

UML REFERENCE SHEETS. 2013, 2014 Michael Marking; all rights reserved, including moral rights. Web site: UML Reference Sheets 2013, 2014 Michael Marking; all rights reserved, including moral rights. Web site: http://www.tatanka.com/ Revision Information This document was last revised 2014.03.02. The current

More information

Principles of Software Construction: Objects, Design, and Concurrency. Assigning Responsibilities to Objects. toad. Jonathan Aldrich Charlie Garrod

Principles of Software Construction: Objects, Design, and Concurrency. Assigning Responsibilities to Objects. toad. Jonathan Aldrich Charlie Garrod Principles of Software Construction: Objects, Design, and Concurrency Assigning Responsibilities to Objects toad Fall 2014 Jonathan Aldrich Charlie Garrod School of Computer Science Key concepts from Thursday

More information

CS211 Lecture: Modeling Dynamic Behaviors of Systems; Interaction Diagrams in UML

CS211 Lecture: Modeling Dynamic Behaviors of Systems; Interaction Diagrams in UML CS211 Lecture: Modeling Dynamic Behaviors of Systems; Interaction Diagrams in UML Objectives: 1. To introduce the notion of dynamic analysis 2. To show how to create and read Sequence Diagrams 3. To show

More information

Information Expert (or Expert)

Information Expert (or Expert) Page 2 Page 3 Pattern or Principle? Information Expert (or Expert) Class Responsibility Sale Knows Sale total SalesLineItem Knows line item total ProductDescription Knows product price The GRASP patterns

More information

UNIT-IV BASIC BEHAVIORAL MODELING-I

UNIT-IV BASIC BEHAVIORAL MODELING-I UNIT-IV BASIC BEHAVIORAL MODELING-I CONTENTS 1. Interactions Terms and Concepts Modeling Techniques 2. Interaction Diagrams Terms and Concepts Modeling Techniques Interactions: Terms and Concepts: An interaction

More information

Last Time: Object Design. Comp435 Object-Oriented Design. Last Time: Responsibilities. Last Time: Creator. Last Time: The 9 GRASP Patterns

Last Time: Object Design. Comp435 Object-Oriented Design. Last Time: Responsibilities. Last Time: Creator. Last Time: The 9 GRASP Patterns Last Time: Object Design Comp435 Object-Oriented Design Week 7 Computer Science PSU HBG The main idea RDD: Responsibility-Driven Design Identify responsibilities Assign them to classes and objects Responsibilities

More information

INTERNAL ASSESSMENT TEST III Answer Schema

INTERNAL ASSESSMENT TEST III Answer Schema INTERNAL ASSESSMENT TEST III Answer Schema Subject& Code: Object-Oriented Modeling and Design (15CS551) Sem: V ISE (A & B) Q. No. Questions Marks 1. a. Ans Explain the steps or iterations involved in object

More information

INF 111 / CSE 121: Announcements Quiz #3- Thursday What will it cover?

INF 111 / CSE 121: Announcements Quiz #3- Thursday What will it cover? INF 111 / CSE 121: Software Tools and Methods Lecture Notes for Summer Quarter 2008 Michele Rousseau Lecture Notes 7 - UML Announcements Quiz #3- Thursday What will it cover? All readings assigned since

More information

Object Oriented Paradigm

Object Oriented Paradigm Object Oriented Paradigm Ming-Hwa Wang, Ph.D. Department of Computer Engineering Santa Clara University Object Oriented Paradigm/Programming (OOP) similar to Lego, which kids build new toys from assembling

More information

Unit 5: Sequence Diagrams

Unit 5: Sequence Diagrams 1 TTM4115 Design of Reactive Systems 1 Spring 2018 Frank lexander Kraemer, kraemer@ntnu.no Unit 5: Sequence Diagrams Why do we need sequence diagrams? State machines are suitable to show the behavior of

More information

SOFTWARE DESIGN COSC 4353 / Dr. Raj Singh

SOFTWARE DESIGN COSC 4353 / Dr. Raj Singh SOFTWARE DESIGN COSC 4353 / 6353 Dr. Raj Singh UML - History 2 The Unified Modeling Language (UML) is a general purpose modeling language designed to provide a standard way to visualize the design of a

More information

UNIT I. 3. Write a short notes on process view of 4+1 architecture. 4. Why is object-oriented approach superior to procedural approach?

UNIT I. 3. Write a short notes on process view of 4+1 architecture. 4. Why is object-oriented approach superior to procedural approach? Department: Information Technology Questions Bank Class: B.E. (I.T) Prof. Bhujbal Dnyaneshwar K. Subject: Object Oriented Modeling & Design dnyanesh.bhujbal11@gmail.com ------------------------------------------------------------------------------------------------------------

More information

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified)

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified) Subject Code: 17630 Model Answer Page No: 1 /32 Important Instructions to examiners: 1) The answers should be examined by keywords and not as word-to-word as given in the model answer scheme. 2) The model

More information

Object-Oriented Software Engineering Practical Software Development using UML and Java. Chapter 5: Modelling with Classes

Object-Oriented Software Engineering Practical Software Development using UML and Java. Chapter 5: Modelling with Classes Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 5: Modelling with Classes 5.1 What is UML? The Unified Modelling Language is a standard graphical language

More information

CSE 403. UML Sequence Diagrams. Reading: UML Distilled Ch. 4, by M. Fowler

CSE 403. UML Sequence Diagrams. Reading: UML Distilled Ch. 4, by M. Fowler CSE 403 UML Sequence Diagrams Reading: UML Distilled Ch. 4, by M. Fowler These lecture slides are copyright (C) Marty Stepp, 2007. They may not be rehosted, sold, or modified without expressed permission

More information

12 Tutorial on UML. TIMe TIMe Electronic Textbook

12 Tutorial on UML. TIMe TIMe Electronic Textbook TIMe TIMe Electronic Textbook 12 Tutorial on UML Introduction......................................................2.................................................3 Diagrams in UML..................................................3

More information

Meltem Özturan

Meltem Özturan Meltem Özturan www.mis.boun.edu.tr/ozturan/samd 1 2 Modeling System Requirements Object Oriented Approach to Requirements OOA considers an IS as a set of objects that work together to carry out the function.

More information

In this case, the behavior of a single scenario

In this case, the behavior of a single scenario CPSC 491 UML Sequence s UML Sequence s One of many UML notations for modeling behavior A specific type of interaction diagram In this case, the behavior of a single scenario Usually a single call on an

More information

Creating Class Definitions from Design Class Diagrams: public class SalesLineItem // Java { private int quantity;

Creating Class Definitions from Design Class Diagrams: public class SalesLineItem // Java { private int quantity; 24.3.204 Coding (Implementation) The design model (design class diagram and interaction diagrams) provides some of the information that is necessary to generate the code. (Not all of the code) Creating

More information

Object-Oriented and Classical Software Engineering

Object-Oriented and Classical Software Engineering Slide 16.1 Object-Oriented and Classical Software Engineering Seventh Edition, WCB/McGraw-Hill, 2007 Stephen R. Schach srs@vuse.vanderbilt.edu CHAPTER 16 Slide 16.2 MORE ON UML 1 Chapter Overview Slide

More information

Introduction to Unified Modelling Language (UML)

Introduction to Unified Modelling Language (UML) IMPORTANT NOTICE TO STUDENTS These slides are NOT to be used as a replacement for student notes. These slides are sometimes vague and incomplete on purpose to spark a class discussion Introduction to Unified

More information

ADVANCED SOFTWARE DESIGN LECTURE 4 GRASP. Dave Clarke

ADVANCED SOFTWARE DESIGN LECTURE 4 GRASP. Dave Clarke ADVANCED SOFTWARE DESIGN LECTURE 4 GRASP Dave Clarke TODAY S LECTURE We will discuss and apply the GRASP design patterns. These provide principles for evaluating and improving designs. friends User Name??

More information

Introduction to Software Engineering (2+1 SWS) Winter Term 2009 / 2010 Dr. Michael Eichberg Vertretungsprofessur Software Engineering Department of

Introduction to Software Engineering (2+1 SWS) Winter Term 2009 / 2010 Dr. Michael Eichberg Vertretungsprofessur Software Engineering Department of Introduction to Software Engineering (2+1 SWS) Winter Term 2009 / 2010 Dr. Michael Eichberg Vertretungsprofessur Software Engineering Department of Computer Science Technische Universität Darmstadt Dr.

More information

Object-Oriented Design

Object-Oriented Design Object-Oriented Design Lecture 14: Design Workflow Department of Computer Engineering Sharif University of Technology 1 UP iterations and workflow Workflows Requirements Analysis Phases Inception Elaboration

More information

2 UML for OOAD. 2.1 What is UML? 2.2 Classes in UML 2.3 Relations in UML 2.4 Static and Dynamic Design with UML. UML for OOAD Stefan Kluth 1

2 UML for OOAD. 2.1 What is UML? 2.2 Classes in UML 2.3 Relations in UML 2.4 Static and Dynamic Design with UML. UML for OOAD Stefan Kluth 1 2 UML for OOAD 2.1 What is UML? 2.2 Classes in UML 2.3 Relations in UML 2.4 Static and Dynamic Design with UML UML for OOAD Stefan Kluth 1 2.1 UML Background "The Unified Modelling Language (UML) is a

More information

Inheritance. OOP components. Another Example. Is a Vs Has a. Virtual Destructor rule. Virtual Functions 4/13/2017

Inheritance. OOP components. Another Example. Is a Vs Has a. Virtual Destructor rule. Virtual Functions 4/13/2017 OOP components For : COP 3330. Object oriented Programming (Using C++) http://www.compgeom.com/~piyush/teach/3330 Data Abstraction Information Hiding, ADTs Encapsulation Type Extensibility Operator Overloading

More information

What is a Model? Copyright hebley & Associates

What is a Model? Copyright hebley & Associates Modeling Overview... as we know, there are known knowns; there are things we know we know. We also know there are known unknowns; that is to say we know there are some things we do not know. But there

More information

UML 2.0 UML 2.0. Scott Uk-Jin Lee. Division of Computer Science, College of Computing Hanyang University ERICA Campus

UML 2.0 UML 2.0. Scott Uk-Jin Lee. Division of Computer Science, College of Computing Hanyang University ERICA Campus UML 2.0 Division of Computer Science, College of Computing Hanyang University ERICA Campus Introduction to UML 2.0 UML Unified Modeling Language Visual language for specifying, constructing and documenting

More information

3: Modeling Behavior with UML Sequence Diagrams

3: Modeling Behavior with UML Sequence Diagrams Outline UML Design Supplement 3: Modeling Behavior with UML Sequence Diagrams Introduction Basic notation Alternating paths Modularity Slide adapted from Eran Toch s lecture series Specification and Analysis

More information

Week. Lecture Topic day (including assignment/test) 1 st 1 st Introduction to Module 1 st. Practical

Week. Lecture Topic day (including assignment/test) 1 st 1 st Introduction to Module 1 st. Practical Name of faculty: Gaurav Gambhir Discipline: Computer Science Semester: 6 th Subject: CSE 304 N - Essentials of Information Technology Lesson Plan Duration: 15 Weeks (from January, 2018 to April, 2018)

More information

Graphical Interface and Application (I3305) Semester: 1 Academic Year: 2017/2018 Dr Antoun Yaacoub

Graphical Interface and Application (I3305) Semester: 1 Academic Year: 2017/2018 Dr Antoun Yaacoub Lebanese University Faculty of Science Computer Science BS Degree Graphical Interface and Application (I3305) Semester: 1 Academic Year: 2017/2018 Dr Antoun Yaacoub 2 Crash Course in JAVA Classes A Java

More information

System Sequence Diagrams. Based on Craig Larman, Chapter 10 and Anuradha Dharani s notes

System Sequence Diagrams. Based on Craig Larman, Chapter 10 and Anuradha Dharani s notes System Sequence Diagrams Based on Craig Larman, Chapter 10 and Anuradha Dharani s notes Dynamic behaviors Class diagrams represent static relationships. Why? What about modeling dynamic behavior? Interaction

More information

Overview. CMSC 330: Organization of Programming Languages. Concurrency. Multiprocessors. Processes vs. Threads. Computation Abstractions

Overview. CMSC 330: Organization of Programming Languages. Concurrency. Multiprocessors. Processes vs. Threads. Computation Abstractions CMSC 330: Organization of Programming Languages Multithreaded Programming Patterns in Java CMSC 330 2 Multiprocessors Description Multiple processing units (multiprocessor) From single microprocessor to

More information

Domain Modeling- 2. Generalization

Domain Modeling- 2. Generalization Generalization Domain Modeling- 2 Conceptual superclasses and subclasses When to create a subclass? A superclass? Abstract classes Modeling state changes Operation contracts Attaching pre- /post-conditions

More information

Control Statements: Part Pearson Education, Inc. All rights reserved.

Control Statements: Part Pearson Education, Inc. All rights reserved. 1 5 Control Statements: Part 2 5.2 Essentials of Counter-Controlled Repetition 2 Counter-controlled repetition requires: Control variable (loop counter) Initial value of the control variable Increment/decrement

More information

02291: System Integration

02291: System Integration 02291: System Integration Week 5 Hubert Baumeister huba@dtu.dk DTU Compute Technical University of Denmark Spring 2017 Contents Object-orientation: Centralized vs Decentralized Control/Computation Class

More information

Developing Shlaer-Mellor Models Using UML

Developing Shlaer-Mellor Models Using UML Developing Shlaer-Mellor Models Using UML Stephen J. Mellor Neil Lang Project Technology, Inc. 10940 Bigge Street San Leandro, California 94577 (510) 567-0255 http://www.projtech.com This position paper

More information

Lesson 11. W.C.Udwela Department of Mathematics & Computer Science

Lesson 11. W.C.Udwela Department of Mathematics & Computer Science Lesson 11 INTRODUCING UML W.C.Udwela Department of Mathematics & Computer Science Why we model? Central part of all the activities We build model to Communicate Visualize and control Better understand

More information

Design Patterns. SE3A04 Tutorial. Jason Jaskolka

Design Patterns. SE3A04 Tutorial. Jason Jaskolka SE3A04 Tutorial Jason Jaskolka Department of Computing and Software Faculty of Engineering McMaster University Hamilton, Ontario, Canada jaskolj@mcmaster.ca November 18/19, 2014 Jason Jaskolka 1 / 35 1

More information