Introduction to UML Diagrams

Size: px
Start display at page:

Download "Introduction to UML Diagrams"

Transcription

1 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 Package Diagrams Based on "UML Distilled", by M. Fowler, 3rd Ed., Addison Wesley,

2 State Machine Diagrams Example transition can delivered Delivering state initial pseudostate Idle entry / lamp off return key / return coin Selecting coke selected / deliver can off-line switch 1fr. introd. [store not full] / lamp on coffee selected / fill cup final state milk key / add milk cup full Filling 3 State Machine Diagrams A State Machine describes the lifetime behavior of a single object (here a drink machine). It is based on the concept of finite automaton. The machine states are represented with rounded rectangles (here: Idle, Selecting, Filling, Delivering) The initial and final states indicate where the state machine starts, resp. where it is completed (implying the deletion of the state machine object) 4

3 State Machine Diagrams A transition indicates a movement from one state to another and has a label that comes in three parts (all optional): Full form: trigger-signal [guard] / activity trigger-signal: event that triggers change of state 1) guard : condition that must be true for the transition to be taken activity: some behavior that is executed during the transition ("action") Each transition must be unequivocal (deterministic behavior) A "self-transition" does not change the machine state (loop-back) Events that occur where no valid transition exists are ignored 1) If not present, the transaction is taken immediately (see also do-activities) 5 State Machine Diagrams Special activities: Internal activity: allows a state to react to events without transition. Event, guard and activity are defined in the state box itself. Entry / Exit activity: is executed whenever a state is entered / left. These activities are triggered by self-transitions (but not when an internal activity is executed). Example: Idle entry / lamp off exit / lamp on 1fr. introd [store full] / Return coin Other coin introd. / Return coin 6

4 State Machine Diagrams Do-activity: ongoing activity executed within a state ("activity state"). It is marked with "do/". A do-activity is not instantaneous and can be interrupted by a regular event. If present, a transition without trigger signal will be executed, when the do-activity is completed. Example: Waiting Search Searching do / search for file with spec. content Cancel Displaying file 7 State Machine Diagrams Implementation of a state machine: With nested switch (or if) statements By interpreting a state table By using the state pattern State pattern: very general, object oriented implementation, that uses polymorphism with a separate class for each state. State table: captures the state diagram information as data. It can then be used by an interpreter at runtime or by a code generator that generates classes based on it. Nested switches: use a state-oriented or (rather rarely used) an event-oriented structure. 8

5 State Machine Diagrams Example: state table From state To state Event Guard Activity Idle Selecting 1fr. introd. store not full lamp on Idle (final) off-line switch Selecting Filling coffee selected --- fill cup Selecting Delivering coke selected --- deliver can Selecting Idle return key --- return coin lamp off Filling Idle cup full --- lamp off Filling Filling milk key --- add milk Delivering Idle can delivered --- lamp off 9 State Machine Diagrams Example: nested switches (state-oriented structure): public void processevent(int event) { switch (state) { case IDLE: switch (event) { case FR1_INTR: if (!storefull) {lampon(); state = SELECTING;} break; case OFF_LINE: state = FINAL; break; } break; case SELECTING: switch (event) { case COFFE_SELECTED: fillcup(); state = FILLING; break; case COKE_SELECTED: delivercan(); state = DELIVERING; break; case RETURN_KEY: returncoin(); lampoff(); state = IDLE; break; } break; 10

6 State Machine Diagrams case FILLING: switch (event) { case CUP_FULL: lampoff(), state = IDLE; break; case MILK_KEY: addmilk(); break; } break; case DELIVERING: switch (event) { case CAN_DELIVERED: lampoff(), state = IDLE; break; } break; } } 11 Class Diagrams A UML class diagram describes the type of objects in the system and the various kinds of static relationships that exist among them. shows the properties and operations of a class and the constraints that apply to the way objects are connected. Representing a class Student Student Student Student class name attributes name address birthdate getinitials() getabbreviation() billschoolfees() operations name address birthdate getinitials() getabbreviation() billschoolfees() 12

7 Class Diagrams Class name: in bold Attribute: notation to represent a property of a class. Full form: visibility name: type [multiplicity] = default {property-string} visibility: + : public, # : protected, ~ : package, - : private name: attribute field name (mandatory) type: attribute type multiplicity: indicates how many objects may fill the property, in the form: lower bound..upper bound (the game of "Jass" may two 2, 3 or 4 players) - 1 (a student may have exactly one name): default - * (no upper bound, same as 0..*) default value: value of the newly created field property-strg: indicates additionnal properties for the attribute Example: # address: String[1..2] = null {readonly} 13 Class Diagrams Association: represents a class property, using a solid line between two classes (poss. with opened arrow). Much of the same infos showed on an attribute appears on an association The property name (role name) and infos are indicated at the target end of the association. If needed, the direction of the association is shown by a navigability arrow Name {readonly} Student birthdate Date 1 address 1..2 String 14

8 Class Diagrams Bidirectional Association: With navigability arrows Person owner cars 0..1 Car make:string (Representing properties as attributes) Without showing navigability Person owner cars 0..1 Car make:string Showing an assocation with a verb: Arrow is optional Person owns 0..1 Car make:string Person cars:car[ ] Car owner:person[0..1] make:string 15 Class Diagrams Operations: actions that a class knows to carry out methods Full form: visibility name (parameter-list): return-type {property-string} visibility: + : public, # : protected, ~ : package, - : private name: operation name (mandatory) parameter-list: notated as attributes. For each parameter, the full form is: (direction) name: type = default direction: in (for input par.), out (for output par.), inout (for both) return-type: type of return-value property-strg: indicates additionnal properties appliying to the operation Example: + transfer(other: BankAccount, amount: double): boolean 16

9 Class Diagrams Generalization: represents a class hierarchy between two classes, using a solid closed arrow. Vehicle Applet Car Bike WelcomerApplet Comments: can be linked with a dashed line to the element they are commenting Includes pick-ups and vans but not motorbikes Car 17 Class Diagrams Dependency: exists between two elements, if changes to the definition of one element may cause changes to the other. In particular, a class depends on another class if it uses objects of that other class. A dependency is represented by a dashed opened arrow. E.g. an Applet depends on a Graphics object: Applet paint(graphics) Graphics Note If a class is associated with another, you can navigate from its objects to objects of the other class. Hence, association is a stronger form of dependency To outline the type of dependency, you can label the arrow with a «keyword» (e.g. «uses», «creates», «calls», etc.) Many UML relationsships imply a dependency 18

10 Class Diagrams Aggregation: association that builds a "part-of" relationship. It is represented with an empty diamond: Engine Car Wheel Composition: "strong" version of aggregation, in which any class instance must be a component of only one owner. It is represented with a full diamond: Head 1 1 Person 1 2 arm 2 leg Deleting one Person should also delete one Head, two Arm and two Leg instances. 19 Class Diagrams Static operations and attributes are underlined on a class diagram; e.g.: CarTest PI: double {final} main Derived properties can be calculated based on other values. They are noted with /; e.g.: DateRange start: Date end: Date /duration: int duration = end - start 20

11 Class Diagrams Abstract classes and operations are indicated by italicizing the name, or by adding the keyword {abstract} (abbreviated: {A}). Interfaces are indicated by the keyword «interface» (abbr.: «I»). A class provides an interface, by implementing it. This is indicated with a dashed closed arrow. A class requires an interface, if it has a dependency on the interface. As for class dependencies, this is indicated with a dashed opened arrow. An interface hierarchy is represented, as by classes, by a solid closed arrow (see "generalization"). 21 Class Diagrams Example: «interface» Collection equals add Order lineitems[ ] «interface» List get AbstractList equals get add ArrayList get add 22

12 Class Diagrams A more compact notation represents the implemented interfaces by using "lollipops" (ball icons): Order lineitems[ ] List ArrayList Collection Enumerations: fixed set of values without any particular properties. They are shown as the class with the keyword «enumeration» «enumeration» Color red green blue 23 Object Diagrams A UML object (instance) diagram is a snapshot of the objects in a system at a point of time. shows values for attributes and links as by class diagrams. Representing an object john:student john:student :Student john name = "John F." address birthdate 24

13 Object Diagrams Example: Class diagram: Module Course term studlist Student studlist 1 special Topic Object diagram: prog1:course term = "Fall" :Module prog2:course term = "Spring" dupond dupont haddock tournesol special security:topic web:topic special 25 Sequence Diagrams A UML sequence diagram describes how groups of objects collaborate in some behavior. captures the behavior of a single scenario. is part of the UML interaction diagrams In a sequence diagram: objects are named as in object diagrams (without attributes), but are not underlined (UML 2). the object life duration is indicated by a dashed vertical line ("lifeline") each lifeline has a bar that shows when the object is activ (optional). invoking an operation on an object is indicated by a solid closed arrow returning a value from an operation is indicated by a dashed opened arrow (optional). naming often is useful to correlate objects on the diagram. 26

14 Sequence Diagrams Example: order orderline product calculateprice calculateprice getprice(quantity: int) customer price price getdiscountedvalue(order) getbasevalue discountedvalue orderprice 27 Sequence Diagrams Creating and deleting objects: query DBhandler new querycmd new execute DBstat extract results results close 28

15 Sequence Diagrams Static calls and return values: «metaclass» :TriangleTest «metaclass» :Math main new triangle getperimeter perimeter a = sqrt(a x a x + a y a y ) b = sqrt(b x b x + b y b y ) c = sqrt(c x c x + c y c y ) 29 Sequence Diagrams Structures: To represent structures within a sequence diagram, use interaction frames Frames consist of some region of a sequence diagram that is divided into fragments. Each frame has an operator and each fragment may have a guard. Common operators are: alt: alternative multiple fragments (if..else) opt: optional fragment (if alone) par: parallel, each fragment is run in parallel loop: fragment may execute multiple times region: critical region sd: refers to another sequence diagram 30

16 Sequence Diagrams Example: Pseudo-code: dispatch() { for each lineitems { if (prod.value > 1000) careful.dispatch else regular.dispatch } if (needsconfirmation) messenger.confirm } loop order dispatch alt [for each lineitem] [value > 10000] dispatch careful: Distributor regular: Distributor :Messenger [else] dispatch opt [needsconfirmation] confirm 31 Package Diagrams A UML package diagram allows to represent class packages (in the Java sense) and their dependencies. Representing packages: util util Date util Date java::util java util nested packages Date Date java::util::date 32

17 Package Diagrams Packages dependencies Package pack1 depends on package pack2, if any class of pack1 has a dependency to any class of pack2. Example bank BankAccount Purse bank::currency Coin 33 Package Diagrams Implementation of packages It is quite common for an interface and its implementation to be in separate packages. You can indicate such relationship using the same notation as for class diagrams Example control control Button CheckBox «I» Switch turnon turnoff furnace lighting furnace::heater lighting::light 34

18 Finite State Machines - Implementation State Design Pattern 35

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

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

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

Software Service Engineering

Software Service Engineering Software Service Engineering Lecture 4: Unified Modeling Language Doctor Guangyu Gao Some contents and notes selected from Fowler, M. UML Distilled, 3rd edition. Addison-Wesley Unified Modeling Language

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

UML Modeling I. Instructor: Yongjie Zheng September 3, CS 490MT/5555 Software Methods and Tools

UML Modeling I. Instructor: Yongjie Zheng September 3, CS 490MT/5555 Software Methods and Tools UML Modeling I Instructor: Yongjie Zheng September 3, 2015 CS 490MT/5555 Software Methods and Tools Object-Oriented Design: Topics & Skills Rational Unified Process Unified Modeling Languages (UML) Provide

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

Modeling with UML. (1) Use Case Diagram. (2) Class Diagram. (3) Interaction Diagram. (4) State Diagram

Modeling with UML. (1) Use Case Diagram. (2) Class Diagram. (3) Interaction Diagram. (4) State Diagram Modeling with UML A language or notation intended for analyzing, describing and documenting all aspects of the object-oriented software system. UML uses graphical notations to express the design of software

More information

S T R U C T U R A L M O D E L I N G ( M O D E L I N G A S Y S T E M ' S L O G I C A L S T R U C T U R E U S I N G C L A S S E S A N D C L A S S D I A

S T R U C T U R A L M O D E L I N G ( M O D E L I N G A S Y S T E M ' S L O G I C A L S T R U C T U R E U S I N G C L A S S E S A N D C L A S S D I A S T R U C T U R A L M O D E L I N G ( M O D E L I N G A S Y S T E M ' S L O G I C A L S T R U C T U R E U S I N G C L A S S E S A N D C L A S S D I A G R A M S ) WHAT IS CLASS DIAGRAM? A class diagram

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

Course "UML and Design Patterns" of module "Software Engineering and Design", version February 2011 (X)

Course UML and Design Patterns of module Software Engineering and Design, version February 2011 (X) UML Class Diagrams Prof. Dr. Eric Dubuis, @ Biel Course "UML and Design Patterns" of module "Software Engineering and Design", version February 2011 (X) BFH/TI/Software Engineering and Design/UML and Design

More information

Computer Science for Engineers

Computer Science for Engineers Computer Science for Engineers Lecture 5 Object Orientation part 3 Prof. Dr. Dr.-Ing. Jivka Ovtcharova Dipl. Wi.-Ing. Dan Gutu 27 th of November 2009 Aggregation and Composition (1) A special case of an

More information

Principles of Software Construction: Objects, Design and Concurrency. Just enough UML. toad

Principles of Software Construction: Objects, Design and Concurrency. Just enough UML. toad Principles of Software Construction: Objects, Design and Concurrency Just enough UML 15-214 toad Christian Kästner Charlie Garrod School of Computer Science With slides from Klaus Ostermann Learning Goals

More information

Object-Oriented Design

Object-Oriented Design Software and Programming I Object-Oriented Design Roman Kontchakov / Carsten Fuhs Birkbeck, University of London Outline Discovering classes and methods Relationships between classes An object-oriented

More information

Software Modelling. UML Class Diagram Notation. Unified Modeling Language (UML) UML Modelling. CS 247: Software Engineering Principles

Software Modelling. UML Class Diagram Notation. Unified Modeling Language (UML) UML Modelling. CS 247: Software Engineering Principles CS 247: Software Engineering Principles UML Modelling InStacks Software Modelling Publication[p] borrow(m,p) / BorrowItem(m, p, today) return(p) / ReturnItem(p, today) OnLoan lost A software model is an

More information

Software Specification 2IX20

Software Specification 2IX20 Software Specification 2IX20 Julien Schmaltz (slides from A. Serebrenik and M. Mousavi) Lecture 04: Structural specification / Class diagrams UML diagram types Classes: Chapter 11.4 of the UML standard.

More information

State Machine Diagrams

State Machine Diagrams State Machine Diagrams Introduction A state machine diagram, models the dynamic aspects of the system by showing the flow of control from state to state for a particular class. 2 Introduction Whereas an

More information

A - 1. CS 494 Object-Oriented Analysis & Design. UML Class Models. Overview. Class Model Perspectives (cont d) Developing Class Models

A - 1. CS 494 Object-Oriented Analysis & Design. UML Class Models. Overview. Class Model Perspectives (cont d) Developing Class Models CS 494 Object-Oriented Analysis & Design UML Class Models Overview How class models are used? Perspectives Classes: attributes and operations Associations Multiplicity Generalization and Inheritance Aggregation

More information

CS 247: Software Engineering Principles. UML Modelling

CS 247: Software Engineering Principles. UML Modelling CS 247: Software Engineering Principles UML Modelling Agenda: UML class diagrams UML object diagrams UML sequence diagrams Reading: Martin Fowler, UML Distilled, 3rd ed, Addison-Wesley Professional, 2004.

More information

Unified Modeling Language (UML) Class Diagram

Unified Modeling Language (UML) Class Diagram 1 / 10 Unified Modeling Language (UML) Class Diagram Miaoqing Huang University of Arkansas Spring 2010 2 / 10 Outline 1 2 3 / 10 Class Diagram Class diagrams show the static structure of the classes that

More information

Software Engineering I (02161)

Software Engineering I (02161) Software Engineering I (02161) Week 7 Assoc. Prof. Hubert Baumeister DTU Compute Technical University of Denmark Spring 2018 Contents Sequence Diagrams Object-orientation: Centralized vs Decentralized

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

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

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

More information

Object-Oriented Systems Development: Using the Unified Modeling Language

Object-Oriented Systems Development: Using the Unified Modeling Language Object-Oriented Systems Development: Using the Unified Modeling Language Chapter 5: Unified Modeling Language Goals Modeling. Unified modeling language. Class diagram. Use case diagram. Interaction diagrams.

More information

Introduction to Software Engineering. 5. Modeling Objects and Classes

Introduction to Software Engineering. 5. Modeling Objects and Classes Introduction to Software Engineering 5. Modeling Objects and Classes Roadmap > UML Overview > Classes, attributes and operations > UML Lines and Arrows > Parameterized Classes, Interfaces and Utilities

More information

Credit where Credit is Due. Lecture 4: Fundamentals of Object Technology. Goals for this Lecture. Real-World Objects

Credit where Credit is Due. Lecture 4: Fundamentals of Object Technology. Goals for this Lecture. Real-World Objects Lecture 4: Fundamentals of Object Technology Kenneth M. Anderson Object-Oriented Analysis and Design CSCI 6448 - Spring Semester, 2003 Credit where Credit is Due Some material presented in this lecture

More information

Object Mentor, Inc. Or How Uncle Bob uses UML. Copyright by Object Mentor, Inc All Rights Reserved

Object Mentor, Inc. Or How Uncle Bob uses UML.  Copyright by Object Mentor, Inc All Rights Reserved Object Mentor, Inc. Or How Uncle Bob uses UML. www.objectmentor.com fitnesse.org www.xprogramming.com www.junit.org Copyright 1998-2001 by Object Mentor, Inc All Rights Reserved The three modes of UML

More information

UNIT-4 Behavioral Diagrams

UNIT-4 Behavioral Diagrams UNIT-4 Behavioral Diagrams P. P. Mahale Behavioral Diagrams Use Case Diagram high-level behaviors of the system, user goals, external entities: actors Sequence Diagram focus on time ordering of messages

More information

16.1 Introduction... 2

16.1 Introduction... 2 Department of Computer Science Tackling Design Patterns Chapter 16: UML Activity Diagrams Copyright c 2016 by Linda Marshall and Vreda Pieterse. All rights reserved. Contents 16.1 Introduction.................................

More information

Sequence Diagrams. Chapter 4

Sequence Diagrams. Chapter 4 S 1 Chapter 4 Sequence Diagrams Interaction diagrams describe how groups of objects collaborate in some behavior. The UML defines several forms of interaction diagram, of which the most common is the sequence

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

Chapter 5, Analysis: Dynamic Modeling

Chapter 5, Analysis: Dynamic Modeling Chapter 5, Analysis: Dynamic Modeling Using UML, Patterns, and Java Object-Oriented Software Engineering Dynamic Modeling with UML Diagrams for dynamic modeling Interaction diagrams describe the dynamic

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

STATE MACHINES. Figure 1: State Machines

STATE MACHINES. Figure 1: State Machines STATE MACHINES Figure 1: State Machines state machine A state machine is a behavior that specifies the sequences of states an object goes through during its lifetime in response to events. Graphically,

More information

UML Essentials Dynamic Modeling

UML Essentials Dynamic Modeling UML Essentials Dynamic Modeling Excerpts from: Object Oriented Software Engineering by Lethbridge/Laganière and Applying UML and Patterns by Larman, C. Dynamic model (diagram) elements (model run-time)

More information

MSc programme (induction week) Department of Informatics INTRODUCTION TO UML

MSc programme (induction week) Department of Informatics INTRODUCTION TO UML MSc programme (induction week) Department of Informatics INTRODUCTION TO UML Some of this material is based on Bernd Bruegge and Allen H. Dutoit (2009) Object-Oriented Software Engineering: Using UML,

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

Chapter 2, lecture 2 Modeling with UML

Chapter 2, lecture 2 Modeling with UML Object-Oriented Software Engineering Using UML, Patterns, and Java Chapter 2, lecture 2 Modeling with UML Overview: More detail on modeling with UML Use case diagrams Class diagrams Sequence diagrams Activity

More information

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

Applying UML & Patterns (3 rd ed.) Chapter 15 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

More information

CSE 403: Software Engineering, Spring courses.cs.washington.edu/courses/cse403/15sp/ UML Class Diagrams. Emina Torlak

CSE 403: Software Engineering, Spring courses.cs.washington.edu/courses/cse403/15sp/ UML Class Diagrams. Emina Torlak CSE 403: Software Engineering, Spring 2015 courses.cs.washington.edu/courses/cse403/15sp/ UML Class Diagrams Emina Torlak emina@cs.washington.edu Outline Designing classes Overview of UML UML class diagrams

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

02291: System Integration

02291: System Integration 02291: System Integration Hubert Baumeister hub@imm.dtu.dk Spring 2011 Contents 1 Recap 1 2 More UML Diagrams 2 2.1 Object Diagrams........................................... 2 2.2 Communication Diagrams......................................

More information

Course "Softwaretechnik" Book Chapter 2 Modeling with UML

Course Softwaretechnik Book Chapter 2 Modeling with UML Course "Softwaretechnik" Book Chapter 2 Modeling with UML Lutz Prechelt, Bernd Bruegge, Allen H. Dutoit Freie Universität Berlin, Institut für Informatik http://www.inf.fu-berlin.de/inst/ag-se/ Modeling,

More information

Structural specification

Structural specification 2IW80 Software specification and architecture Structural specification Alexander Serebrenik Before we start Time-related signal in an activity diagram is represented as a) b) c) / SET / W&I 11/02/15 PAGE

More information

Software Engineering I (02161)

Software Engineering I (02161) Software Engineering I (02161) Week 6 Assoc. Prof. Hubert Baumeister DTU Compute Technical University of Denmark Spring 2016 Contents Sequence Diagrams II Object-orientation: Centralized vs Decentralized

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

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

Modeling System Behavior. Events Scenarios Sequence Diagrams Collaboration Diagrams

Modeling System Behavior. Events Scenarios Sequence Diagrams Collaboration Diagrams References: Jacquie Barker,Beginning Java Objects ; Booch, Rumbaugh and Jacobson, The Unified Modeling Language User Guide; internet notes; Martin Fowler,UML Distilled; 10/8/2003 1 Events Scenarios Sequence

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

OO System Models Static Views

OO System Models Static Views OO System Models Static Views UML Class & Object Diagrams Software Engineering OO Models Class Diagram Slide 1 Objective Introduces the evolutionary approach for building classes Explain how to identify

More information

Object Orientated Analysis and Design. Benjamin Kenwright

Object Orientated Analysis and Design. Benjamin Kenwright Notation Part 2 Object Orientated Analysis and Design Benjamin Kenwright Outline Review What do we mean by Notation and UML? Types of UML View Continue UML Diagram Types Conclusion and Discussion Summary

More information

10 Implinks and Endpoints

10 Implinks and Endpoints Chapter 10 Implinks and Endpoints Implementation links and endpoints are important concepts in the SOMT method (described in the SOMT Methodology Guidelines starting in chapter 69 in the User s Manual).

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

State Machine Diagrams

State Machine Diagrams 107 Chapter 10 State Machine Diagrams State machine diagrams are a familiar technique to describe the behavior of a System. Various forms of State diagrams haue been around since the 1960s and the earliest

More information

Introduction to Software Engineering. 6. Modeling Behaviour

Introduction to Software Engineering. 6. Modeling Behaviour Introduction to Software Engineering 6. Modeling Behaviour Roadmap > Use Case Diagrams > Sequence Diagrams > Collaboration (Communication) Diagrams > Activity Diagrams > Statechart Diagrams Nested statecharts

More information

Enterprise Architect. User Guide Series. UML Models. Author: Sparx Systems. Date: 30/06/2017. Version: 1.0 CREATED WITH

Enterprise Architect. User Guide Series. UML Models. Author: Sparx Systems. Date: 30/06/2017. Version: 1.0 CREATED WITH Enterprise Architect User Guide Series UML Models Author: Sparx Systems Date: 30/06/2017 Version: 1.0 CREATED WITH Table of Contents UML Models UML Diagrams UML Structural Models Class Diagram Composite

More information

Design and UML Class Diagrams

Design and UML Class Diagrams Design and UML Class Diagrams 1 Suggested reading: Practical UML: A hands on introduction for developers http://dn.codegear.com/article/31863 UML DistilledCh. 3, by M. Fowler How do people draw / write

More information

Statecharts 1.- INTRODUCTION 1.- INTRODUCTION

Statecharts 1.- INTRODUCTION 1.- INTRODUCTION Statecharts INDEX 1.- Introduction 2.- When to use Statecharts 3.- Basic components 4.- Connectors and compound transitions Mª Ángeles Martínez Ibáñez University of Bergen Selected topics in programming

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

Object-Oriented Design and Modeling Using the UML

Object-Oriented Design and Modeling Using the UML Design Classes Object-Oriented Design and Modeling Using the UML Based on Chapter 18 of Whitten, Bentley, and Dittman: Systems Analysis and Design for the Global Enterprise (7th Ed). McGraw Hill. 2007

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

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

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

Today s Topic. Lecture 5. What is UML? Why Use UML. UML Diagrams. Introduction to UML. What is UML Why use UML? UML Diagrams

Today s Topic. Lecture 5. What is UML? Why Use UML. UML Diagrams. Introduction to UML. What is UML Why use UML? UML Diagrams Today s Topic Lecture 5 Introduction to UML What is UML Why use UML? UML Static Use case, Class, Object Deployment, Component (Physical ) Dynamic Sequence, Collaboration (Interaction ) Activity, State

More information

RSARTE Icons. Mattias Mohlin Senior Software Architect IBM

RSARTE Icons. Mattias Mohlin Senior Software Architect IBM RSARTE Icons Mattias Mohlin Senior Software Architect IBM MODEL ELEMENTS...2 DIAGRAMS...3 VIRTUAL FOLDERS...3 FILES AND FOLDERS...4 OVERLAY ICONS...4 DIAGRAM DECORATOR ICONS...5 This document explains

More information

CS 451 Software Engineering

CS 451 Software Engineering CS 451 Software Engineering Yuanfang Cai Room 104, University Crossings 215.895.0298 yfcai@cs.drexel.edu 1 Elaboration 2 Elaboration: Building the Analysis Model An analysis model provides a description

More information

Page 1. Dynamic Modeling. How do you find classes? Dynamic Modeling with UML. UML Interaction Diagrams. UML State Chart Diagram.

Page 1. Dynamic Modeling. How do you find classes? Dynamic Modeling with UML. UML Interaction Diagrams. UML State Chart Diagram. Dynamic Modeling How do you find classes? We have already established several sources for class identification: Application domain analysis: We find classes by talking to the client and identify abstractions

More information

JOURNAL OF OBJECT TECHNOLOGY

JOURNAL OF OBJECT TECHNOLOGY JOURNAL OF OBJECT TECHNOLOGY Online at http://www.jot.fm. Published by ETH Zurich, Chair of Software Engineering JOT, 2004 Vol. 3, No. 7, July-August 2004 UML 2 Activity and Action Models Part 5: Partitions

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

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

Topic 7: Algebraic Data Types

Topic 7: Algebraic Data Types Topic 7: Algebraic Data Types 1 Recommended Exercises and Readings From Haskell: The craft of functional programming (3 rd Ed.) Exercises: 5.5, 5.7, 5.8, 5.10, 5.11, 5.12, 5.14 14.4, 14.5, 14.6 14.9, 14.11,

More information

Combined Modeling and Programming with State Machines

Combined Modeling and Programming with State Machines Combined Modeling and Programming with State Machines Kjetil Andresen Master s Thesis Spring 2014 Combined Modeling and Programming with State Machines Kjetil Andresen 1st May 2014 ii Abstract As part

More information

Pieter van den Hombergh. Fontys Hogeschool voor Techniek en Logistiek. September 9, 2016

Pieter van den Hombergh. Fontys Hogeschool voor Techniek en Logistiek. September 9, 2016 Pieter van den Hombergh Fontys Hogeschool voor Techniek en Logistiek September 9, 2016 Contents /FHTenL September 9, 2016 2/35 UML State Uses and application In behaviour is modeled with state charts (diagrams)

More information

Object-Oriented Design

Object-Oriented Design Object-Oriented Design Lecture 15: Refining Analysis Relationships Department of Computer Engineering Sharif University of Technology 1 Refining Analysis Relationships Relationships in analysis are converted

More information

Enterprise Architect - UML Dictionary

Enterprise Architect - UML Dictionary Enterprise Architect is an intuitive, flexible and powerful UML analysis and design tool for building robust and maintainable software. This dictionary explains the way in which Enterprise Architect represents

More information

Unified Modeling Language (UML)

Unified Modeling Language (UML) 1.17 Software Engineering Case Study: Introduction to Object Technology and the UML (Required) Object orientation A natural way of thinking about the world and computer programs Unified Modeling Language

More information

From Design to Implementation. CSCE Lecture 19-10/27/2016

From Design to Implementation. CSCE Lecture 19-10/27/2016 From Design to Implementation CSCE 740 - Lecture 19-10/27/2016 Class Diagram Control Panel Notifies Room Requests Heat Furnace On-Off Switch Thermostat Water Valve Temp Sensor Starts Pushes Adjusts Water

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

SEEM4570 System Design and Implementation Lecture 11 UML

SEEM4570 System Design and Implementation Lecture 11 UML SEEM4570 System Design and Implementation Lecture 11 UML Introduction In the previous lecture, we talked about software development life cycle in a conceptual level E.g. we need to write documents, diagrams,

More information

BSc. (Hons.) Software Engineering. Examinations for / Semester 2

BSc. (Hons.) Software Engineering. Examinations for / Semester 2 BSc. (Hons.) Software Engineering Cohort: BSE/04/PT Examinations for 2005-2006 / Semester 2 MODULE: OBJECT ORIENTED PROGRAMMING MODULE CODE: BISE050 Duration: 2 Hours Reading Time: 5 Minutes Instructions

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

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

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

SOFTWARE ENGINEERING UML FUNDAMENTALS. Saulius Ragaišis.

SOFTWARE ENGINEERING UML FUNDAMENTALS. Saulius Ragaišis. SOFTWARE ENGINEERING UML FUNDAMENTALS Saulius Ragaišis saulius.ragaisis@mif.vu.lt Information source Slides are prepared on the basis of Bernd Oestereich, Developing Software with UML: Object- Oriented

More information

CHAPTER 5 ARCHITECTURAL DESIGN SE211 SOFTWARE DESIGN

CHAPTER 5 ARCHITECTURAL DESIGN SE211 SOFTWARE DESIGN CHAPTER 5 ARCHITECTURAL DESIGN SE211 SOFTWARE DESIGN Assist. Prof. Dr. Volkan TUNALI Faculty of Engineering and Natural Sciences / Maltepe University OVERVIEW 2 SECTION 1 Architectural Design SECTION 2

More information

Software Engineering I (02161)

Software Engineering I (02161) Software Engineering I (02161) Week 2: Class diagrams part 1 Hubert Baumeister Informatics and Mathematical Modelling Technical University of Denmark Spring 2010 c 2010 H. Baumeister (IMM) Software Engineering

More information

Unified Modeling Language (UML)

Unified Modeling Language (UML) Appendix H Unified Modeling Language (UML) Preview The Unified Modeling Language (UML) is an object-oriented modeling language sponsored by the Object Management Group (OMG) and published as a standard

More information

Chapter 2, Modeling with UML, Part 2

Chapter 2, Modeling with UML, Part 2 Object-Oriented Software Engineering Using UML, Patterns, and Java Chapter 2, Modeling with UML, Part 2 Outline of this Class What is UML? A more detailed view on ü Use case diagrams ü Class diagrams ü

More information

The Dynamic Model. An Introduction to UML. Enterprise Architect. by Geoffrey Sparks. All material (c) Geoffrey Sparks

The Dynamic Model. An Introduction to UML. Enterprise Architect. by Geoffrey Sparks. All material (c) Geoffrey Sparks An Introduction to UML The Dynamic Model by Geoffrey Sparks All material (c) Geoffrey Sparks 2001 www.sparxsystems.com.au Geoffrey Sparks 2001 Page:1 Table of Contents THE DYNAMIC MODEL... 3 INTRODUCTION

More information

AP CSA 3rd Period MR. D. Course Map

AP CSA 3rd Period MR. D. Course Map AP CSA 3rd Period MR. D. Course Map AP Computer Science in Java (Mocha) Aug. 10, Aug. 11, Aug. 14, Aug. 15, 1.1.1 Introduction to With Karel 1.1.2 Quiz: Karel Commands 1.1.3 Our First Karel Program 1.1.4

More information

7. UML Sequence Diagrams Page 1 of 1

7. UML Sequence Diagrams Page 1 of 1 7. UML Sequence Diagrams Page 1 of 1 Sequence Diagram in UML In the last article, we saw Activity diagrams, the notations to be used in Activity diagrams, their significance, and how to build an Activity

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

Object-Oriented Systems Analysis and Design Using UML

Object-Oriented Systems Analysis and Design Using UML 10 Object-Oriented Systems Analysis and Design Using UML Systems Analysis and Design, 8e Kendall & Kendall Copyright 2011 Pearson Education, Inc. Publishing as Prentice Hall Learning Objectives Understand

More information

Object Oriented Modeling

Object Oriented Modeling Overview UML Unified Modeling Language What is Modeling? What is UML? A brief history of UML Understanding the basics of UML UML diagrams UML Modeling tools 2 Modeling Object Oriented Modeling Describing

More information

UML Diagrams & And Some Of Their Elements

UML Diagrams & And Some Of Their Elements UML Diagrams 2013, J.P.N., page 1 UML Diagrams & And Some Of Their Elements UML Diagrams 2013, J.P.N., page 2 Building blocks of the UML As part of a model you have: modelling elements relationships between

More information

Chapter 2, Modeling with UML, Part 2

Chapter 2, Modeling with UML, Part 2 Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 2, Modeling with UML, Part 2 Outline of this Class What is UML? A more detailed view on Use case diagrams Class diagrams Sequence

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

More on the Chen Notation

More on the Chen Notation More on the Chen Notation Reference: http://www.vertabelo.com/blog/technical-articles/chen-erd-notation Peter Chen, who developed entity-relationship modeling and published his work in 1976, was one of

More information

Object-Oriented Software Engineering Practical Software Development using UML and Java. Chapter 8: Modelling Interactions and Behaviour

Object-Oriented Software Engineering Practical Software Development using UML and Java. Chapter 8: Modelling Interactions and Behaviour Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour 8.1 Interaction Diagrams Interaction diagrams are used to model the

More information