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

Similar documents
Object-Interaction Diagrams: Sequence Diagrams UML

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

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

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

Interaction Modelling: Sequence Diagrams

UNIT-4 Behavioral Diagrams

Meltem Özturan

Sequence Diagrams. Massimo Felici. Massimo Felici Sequence Diagrams c

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

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

State Machine Diagrams

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

UML- a Brief Look UML and the Process

Ali Khan < Project Name > Design Document. Version 1.0. Group Id: S1. Supervisor Name: Sir.

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

12 Tutorial on UML. TIMe TIMe Electronic Textbook

Object-Oriented Systems Analysis and Design Using UML

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

Interactions A link message

SEEM4570 System Design and Implementation Lecture 11 UML

Unified Modeling Language

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

SOFTWARE ENGINEERING UML FUNDAMENTALS. Saulius Ragaišis.

Oral Questions. Unit-1 Concepts. Oral Question/Assignment/Gate Question with Answer

UML Essentials Dynamic Modeling

EVENTS AND SIGNALS. Figure 1: Events. kinds of events Signal Event

Software Service Engineering

Unified Modeling Language (UML)

Object Oriented Modeling

Course "Softwaretechnik" Book Chapter 2 Modeling with UML

Introduction to Unified Modelling Language (UML)

SEEM4570 System Design and Implementation. Lecture 10 UML

Unified Modeling Language (UML) Object Diagram and Interaction Diagrams

UML (Unified Modeling Language)

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

OBJECT ORIENTED DESIGN with the Unified Process. Use Case Realization

Lecture 21 Detailed Design Dynamic Modeling with UML

Object-Oriented and Classical Software Engineering

SOFTWARE DESIGN COSC 4353 / Dr. Raj Singh

Introduction to UML Diagrams

UML Component Diagrams A.Y 2018/2019

OBJECT ORIENTED DESIGN with the Unified Process. Use Case Realization

INTRODUCTION TO UNIFIED MODELING MODEL (UML) & DFD. Slides by: Shree Jaswal

CS 451 Software Engineering

7. UML Sequence Diagrams Page 1 of 1

Today s Agenda UML. CompSci 280 S Introduction to Software Development. 1.Introduction UML Diagrams. Topics: Reading:

Object Interaction Sequence Diagrams

Recap : UML artefacts. Black Box Requirements. Functional Specification. System. System. Test. Design. System. System. Development.

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

Activities Radovan Cervenka

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

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

UML part I. UML part I 1/41

Unit Wise Questions. Unit-1 Concepts

CSE 308. UML Sequence Diagrams. Reading / Reference.

Unified Modeling Language (UML) and Modeling

Software Specification 2IX20

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

UML Tutorial. Unified Modeling Language UML Tutorial

COMP 354: INTRODUCTION TO SOFTWARE ENGINEERING

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

Computer Science for Engineers

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

LABORATORY 1 REVISION

Object Oriented Methods with UML. Lecture -4

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

Software Engineering. Page 1. Objectives. Object-Behavioural Modelling. Analysis = Process + Models. Case Study: Event Identification

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

Question Sheet There are a number of criticisms to UML. List a number of these criticisms.

Software Design and Analysis CSCI 2040

CMPT 354 Database Systems I

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

CMPT 354 Database Systems I

A l Ain University Of Science and Technology

Unified Modeling Language (UML)

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

Unified Modeling Language (UML)

STATE MACHINES. Figure 1: State Machines

Practical UML - A Hands-On Introduction for Developers

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

Introduction to Software Engineering. 6. Modeling Behaviour

Practical UML : A Hands-On Introduction for Developers

Object-Oriented Analysis and Design. Pre-UML Situation. The Unified Modeling Language. Unification Efforts

Database Systems: Design, Implementation, and Management Tenth Edition. Chapter 4 Entity Relationship (ER) Modeling

Object-Oriented Development and UML. Announcement. Agenda 7/3/2008. Class will resume on July 22. Try to complete the lab assignments by July.

Unified Modeling Language (UML) Class Diagram

Ingegneria del Software Corso di Laurea in Informatica per il Management

COSC 3351 Software Design. An Introduction to UML (I)

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

Engineering Design w/embedded Systems

Database Systems: Design, Implementation, and Management Tenth Edition. Chapter 4 Entity Relationship (ER) Modeling

DATABASE SYSTEMS. Chapter 5 Entity Relationship (ER) Modelling DESIGN IMPLEMENTATION AND MANAGEMENT INTERNATIONAL EDITION ROB CORONEL CROCKETT

What is use case modeling? 10 - UML Overview. Use-Case diagrams CMPSCI520/620. Rick Adrion 2003 (except where noted) 1

Database Principles: Fundamentals of Design, Implementation, and Management Tenth Edition. Chapter 7 Data Modeling with Entity Relationship Diagrams

Object-Oriented Systems Development: Using the Unified Modeling Language

Lecture 09. Spring 2018 Borough of Manhattan Community College

UML Diagrams MagicDraw UML Diagrams

Chapter 4. Capturing the Requirements. 4th Edition. Shari L. Pfleeger Joanne M. Atlee

Objectives. Explain the purpose and objectives of objectoriented. Develop design class diagrams

Lab Manual. Object Oriented Analysis And Design. TE(Computer) VI semester

Transcription:

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 Diagrams Two basic kinds of UML Diagrams: Behavior diagrams dynamic behavior Use case Activity State machine (Unofficial) Information flow Interaction emphasize object interactions Sequence Structure diagrams static structure Class Object

UML Use Case Diagram Use case diagram Describe a set of actions (use cases) that some system or systems (subject) should or can perform in collaboration with one or more external users of the system (actors).

UML Use Case Diagram: Notation Use cases Action or sequence of actions Actors Person, organization, or external system that plays a role in one or more interactions with your system Associations Actor Use Case Invocation (NOT data flow) Actor Actor One actor is a specific kind of actor

UML Use Case Diagram: Notation Extending Use Cases Adds optional behavior Including Use Cases Means a given use case is part of another use case

UML Use Case Diagram Example http://www.agilemodeling.com/artifacts/usecasediagram.htm

UML Activity Diagram Activity Diagram High-level business processes or complex logic Does NOT identify who does what http://www.uml-diagrams.org/activity-diagrams-controls.html

UML Activity Diagram: Notation Initial node Activity final node Activity Single step of activity Flow/edge Shows flow of control from one action to the next Flow final Flow stops ONLY on this path (does not affect other flows) http://www.sparxsystems.com/resources/uml2_tutorial/uml2_activitydiagram.html http://www.uml-diagrams.org/activity-diagrams-controls.html

UML Activity Diagram: Notation Condition Must be true to traverse node Text on a flow/edge Decision Diamond with one flow in and several out Merge Merges ALTERNATE flows (NOT parallel flows) Diamond with several flows entering and one leaving Can actually combine decision and merge into one diamond

UML Activity Diagram: Notation Fork Beginning of PARALLEL flows Join All flows MUST COMPLETE before processing may continue out of join Can combine fork and join

UML Activity Diagram: Notation You can also have flows that trigger on or send events: Send signal action Trigger some event Accept signal action Asynchronous event occurred; flow starts there Wait time action Event occurs at certain time or on certain schedule

UML Activity Diagram: Example http://www.uml-diagrams.org/online-shopping-uml-activity-diagram-example.html?context=activity-examples

UML Activity Diagram: Example

UML State Machine Diagram State machine diagram Describes the states of object/interaction and transitions Generally only for very complex classes

UML State Machine Diagram: Notation Simple state No substates or regions Optionally has internal activites Actions performed while in this state Special keywords: entry behavior performed upon entry to the state do ongoing behavior; performed as long as the element is in the state) exit behavior performed upon exit from the state Can also add your own conditions: condition / operation

UML State Machine Diagram: Notation Composite state Has nested states Can also use shorthand notation (and define sub-states elsewhere)

UML State Machine Diagram: Notation You can also have initial nodes, end nodes, conditions, decisions, forks, and joins like in activity diagrams.

UML State Machine Diagram: Water Example

State vs. Activity Diagram State diagram Nodes are states Transitions are events Activity diagram Nodes are activities Transitions are when activities complete (and conditions are met)

Example: Cheese Matcher In-Game State Diagram

Example: Cheese Matcher Cheese Swap Activity Diagram

(Unofficial) UML Information Flow Information Flow diagram Shows exchange of information between actors and system entities at very high level Not an official part of UML

UML Sequence Diagram Sequence diagram Shows message exchanges between lifelines Lifeline = individual participant in the interaction Represents a SINGLE instance Primarily objects and actors Message = one specific kind of communication Specifies sender and receiver Either start of execution or sending/receiving a signal

UML Sequence Diagram: Message Notation Synchronous call Typically operation/function call Wait until response Filled arrow head Asynchronous call/signal Send message proceed immediately without waiting for return value Open arrow head

UML Sequence Diagram: Message Notation Create Creates a new lifeline (often class instance) Delete Destroys a lifeline Usually an X on the bottom to indicate end Reply Reply to an operation call Dashed line with arrow

UML Sequence Diagram: Notation Execution Period in participant's lifetime when it is: Executing behavior/action Sending signal Waiting for reply Two execution occurrences start and finish Thin grey or white rectangle

UML Sequence Diagram: Interaction Fragments Interaction fragment Most general interaction unit E.g., Execution Combined fragment Interaction fragment that defines a combination (expression) of interaction fragments Many different kinds: alt - alternatives opt - option loop iteration break - break par - parallel ref - reference

UML Sequence Diagram: Combined Fragments alt alternatives At most one of the these will be executed, subject to guard conditions opt option Either guard condition true and it executes, or nothing happens loop iteration Loops through execution No guards/limits loop forever Can set max iterations Can set boolean guard

UML Sequence Diagram: Combined Fragments break - break If guard is true, break out of loop par - parallel Execute in any order, possibly in parallel Shorthand notation when order on ONE lifeline is insignificant:

UML Sequence Diagram: Combined Fragments ref interaction use Allows you to refer to another interaction Combined fragment with operator ref

UML Sequence Diagram: Bookshop Example

UML Sequence Diagram: Facebook Auth. Example

UML Class Diagram Class diagram Static model classes, types, contents, relationships Inheritance, aggregation, and association Operations and attributes

UML Class Diagram: Notation Class Represented by box Name, attributes, and methods Association Regular arrow Can have numbers on either end: 1 1 student is enrolled in 1..* 1 or more courses

UML Class Diagram: Notation Abstract class Italicize the name Interface Used the phrase <<interface>> above name

UML Class Diagram: Notation Inheritance Implements

Uses UML Class Diagram: Notation

UML Class Diagram: Notation Aggregation Weak aggregation A has a B, but: B could also be in other aggregations B still may exist if A deleted Composition Strong aggregation whole/part relationship binary association part could be included in at most one composite (whole) at a time if a composite (whole) is deleted, all of its composite parts are normally deleted with it.

UML Class Diagram: Domain Model Example

UML Object Diagram Object diagram Depicts objects and their relationships at a point in time

UML Object Diagram: Notation Specific instance of class Name:Classname

Class vs. Object Diagram Class diagram Shows class type hierarchies, contents, and relationships Object diagram Shows instances of classes and their relationships