Introduction to UML: Unified Modeling Language Ric Holt U Waterloo, March 2009 CS246.

Slides:



Advertisements
Similar presentations
UML an overview.
Advertisements

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 12Slide 1 Software Design l Objectives To explain how a software design may be represented.
Object-Oriented Analysis and Design CHAPTERS 15: UML INTERACTION DIAGRAMS 1.
Chapter 22 Object-Oriented Systems Analysis and Design and UML Systems Analysis and Design Kendall and Kendall Fifth Edition.
UML Class and Sequence Diagrams Violet Slides adapted from Marty Stepp, CSE 403, Winter 2012 CSE 403 Spring 2012 Anton Osobov.
2-1 © Prentice Hall, 2007 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
UML: Unified Modeling Language
1 UML – an overview What is UML? UML stands for Unified Modelling Language. ”The Unified Modelling Language is a visual language for specifying, constructing.
Irwin/McGraw-Hill Copyright © 2004 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS6th Edition.
Basic OOP Concepts and Terms
Lecturer: Dr. AJ Bieszczad Chapter 66-1 Object-Oriented analysis and design Special nature of OO development Use cases Design with UML OO system design.
7M822 UML Introduction 7 September 2010.
IMSE 11 - UML Class Diagrams
Kari R. Schougaard, PhD Stud. Værktøjer og Teknikker, 2006 UNIVERSITY OF AARHUS Department of Computer Science Unified Modeling Language Visual language.
© Copyright Eliyahu Brutman Programming Techniques Course.
SE-565 Software System Requirements More UML Diagrams.
ACM/JETT Workshop - August 4-5, 2005 UML Modeling using MagicDraw UML for Java Programmers.
Unified Modeling Language
CSC535 – Object Oriented Software Development Introduction.
SE-1010 Dr. Mark L. Hornick 1 Introduction to Object-Oriented Programming (OOP) Part 1.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 20 Object-Oriented.
METACASE. WHAT THIS PRESENTATION IS ABOUT  What’s META MODELING?  What’s METACASE?  METAEDIT+ 5.1 EVALUTION PROGRAM  Diagram and its kinds.
Introduction To System Analysis and Design
Copyright 2002 Prentice-Hall, Inc. Chapter 2 Object-Oriented Analysis and Design Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey.
1 UML Basic Training. UML Basic training2 Agenda  Definitions: requirements, design  Basics of Unified Modeling Language 1.4  SysML.
1 ISA&D7‏/8‏/ ISA&D7‏/8‏/2013 Methodologies of the SDLC Traditional Approach to SDLC Object-Oriented Approach to SDLC CASE Tools.
Distributed Java Programming Distributed Java Programming Class #2 August 22, 2002.
Sommerville 2004,Mejia-Alvarez 2009Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
UML diagrams What is UML UML diagrams –Static modeoing –Dynamic modeling 1.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
1 UML Distilled 3e by Martin Fowler Chapter 1 Introduction to UML.
UML Diagrams A tool for presentation of Architecture.
Fall 2010 CS4310 Requirements Engineering A Brief Review of UML & OO Dr. Guoqiang Hu Department of Computer Science UTEP 1.
Basic OOP Concepts and Terms. In this class, we will cover: Objects and examples of different object types Classes and how they relate to objects Object.
Introduction To OOP 1.0 Fundamentals Of Java Programming Language 2.0 Exception Handling 3.0 Classes, Inheritance And Polymorphism © 2011 | PN AZRINA.
1 An Introduction to UML Interaction (Sequence and Communication) Diagrams Georgia State University CIS 3300 Spring, 2009.
Design Jon Walker. More UML ● What is UML again?
SWT - Diagrammatics Lecture 4/4 - Diagramming in OO Software Development - partB 4-May-2000.
1/26 On-demand Learning Series Software Engineering of Web Application - Object-Oriented Development & UML Hunan University, Software School.
Object-Oriented Modeling: Static Models. Object-Oriented Modeling Model the system as interacting objects Model the system as interacting objects Match.
CSE 403, Spring 2008, Alverson Using UML to express Software Architecture.
CSE 403, Spring 2007, Alverson Using UML to express Software Architecture.
Introduction to UML CS A470. What is UML? Unified Modeling Language –OMG Standard, Object Management Group –Based on work from Booch, Rumbaugh, Jacobson.
Software Engineering Lecture 8 Object-Oriented Analysis.
Lecture 9-1 : Intro. to UML (Unified Modeling Language)
UML: A notation for capturing work products
1 Technical & Business Writing (ENG-715) Muhammad Bilal Bashir UIIT, Rawalpindi.
Lecture 14 22/10/15. The Object-Oriented Analysis and Design  Process of progressively developing representation of a system component (or object) through.
Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich, Jeffrey A.
Chapter 3: Introducing the UML
CSCI 3428: Software Engineering Tami Meredith UML Unified Modeling Language.
UML Course Instructor: Rizwana Noor. Overview  Modeling  What is UML?  Why UML?  UML Diagrams  Use Case  Components  Relationships  Notations.
Unified Modeling Language (UML)
CS 501: Software Engineering Fall 1999 Lecture 15 Object-Oriented Design I.
Introduction to UML and Rational Rose UML - Unified Modeling Language Rational Rose 98 - a GUI tool to systematically develop software through the following.
Object Oriented Analysis & Design By Rashid Mahmood.
Unified Modeling Language. What is UML? Standard language for specifying, visualizing, constructing, and documenting the artifacts of software systems,
SWE 214 (071) Introduction to UML Slide 1 Introduction to UML.
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 14 Slide 1 Object-Oriented Design.
1 An Overview of UML. 2 The Unified Modeling Language UML is a graphical language used by software engineers to model software systems during development.
Use Cases UML. Use Cases What are Use Cases?  A statement of the functionality users expect and need, organized by functional units  Different from.
Introduction to UML.
UML(Unified Modeling Language)
Object-Oriented Analysis and Design
UML: Unified modeling language
Introduction to UML: Unified Modeling Language
Basic OOP Concepts and Terms
Introduction to UML Sources:
Chapter 22 Object-Oriented Systems Analysis and Design and UML
Presentation transcript:

Introduction to UML: Unified Modeling Language Ric Holt U Waterloo, March 2009 CS246

2 Example UML Class Diagram

UML: Unified Modeling Language “The Unified Modeling Language (UML) is a family of graphical notations … that help in describing and designing software systems, particularly those built using object-oriented (OO) style” [Martin Fowler in UML Distilled]

History Design notation of various kinds used since programming began: –Flow charts, Pseudo code, Structure Diagrams … With advent of OO, many conflicting notations (1980s, 1990s) These notations were combined and unified (late 1990’s) UML extensively taught in universities ( now).

3 Ways to Use UML (Both forward & reverse engineering) 1)Sketch e.g. at white board Most common, quick and informal Communication & understanding 2)Blueprint Detailed design, implemented by programmer May have tools supporting diagramming 3)Programming Language Tools translate diagrams to executable code

Fowler says… “Almost all the time, my use of the UML is as sketches.” “I’m not a fan of detailed forward engineered blueprints.” “I see the UML as a programming language as a nice idea but doubt that it will ever see significant usage.”

Savitch say: Today’s candidate for a graphical representation formalism is the UML. … It is too early to say whether or not the UML will stand the test of time…” [Savitch, Absolute C++, 3rd Edition]

Software Lifecycle: UML Can Be Used at Various Stages Analysis: OOA –What is system to do? What services is it to provide? Provide requirements for designer. Design: OOD –What will be the parts & structure of the system? How will they interact? Provide blueprint for programmer. Programming: OOP

13 (!!) Kinds of UML Diagrams 1)Activity 2)Class 3)Communication 4)Component 5)Component structure 6)Deployment 7)Interaction 8)Object 9)Package 10)Sequence 11)State machine 12)Timing 13)Use case

Classification of UML Diagrams (Part 1 of 2) Structure 1)Class diagram 2)Component diagram (cmpts can be independently purchased and replaced) 3)Component structure diagram 4)Deployment diagram (what goes on what machine & place) 5)Object diagram 6)Package diagram (pkg = group of classes, e.g. namespace)

Classification of UML Diagrams (Part 2 of 2) Behavior 7)Activity diagram (flow chart) 8)Use Case diagram (scenarios for use of system) 9)State Machine diagram 10)Sequence diagram 11)Communication diagram (data flow diagrams) 12)Interaction diagram (activity + sequence diagrams) 13)Timing diagram

Class Diagrams

13 Example UML Class Diagram

Class Class Name Attribute : type Operation (arg list) : return type Abstract operation Various parts are optional

Instance Specification (Object) ObjectName: Class Name Attribute : type Operation (arg list) : return type Abstract operation Various parts are optional

Role of A Role of B Kinds of Edges Class AClass B SourceTarget Role name ClientSupplier Dependency Navigability Association Role name There are other kinds of edges

Multiplicities on Edges (Cardinalities) 1Exactly one *Many (any number) 0..1Optional (zero or one) m..nSpecified range {ordered}* Ordered

Generalization (Inheritance) Supertype Subtype 1Subtype 2

Note (Comment) Comment about an item Some item eg class

Sequence Diagrams

Example for Sequence Diagram [Fowler] We have an order and are going to invoke a command on it to calculate its price. To do that, the order needs to look at all the line items on the order and determine their prices, which are based on the pricing rules of the order line’s products. Having done that for all the line items, the order then needs to compute an overall discount, which is based on rules tied to the customer.

Example for Sequence Diagram [Fowler] We have an order and are going to invoke a command on it to calculate its price. To do that, the order needs to look at all the line items on the order and determine their prices, which are based on the pricing rules of the order line’s products. Having done that for all the line items, the order then needs to compute an overall discount, which is based on rules tied to the customer.

Example Sequence Diagram anOrder anOrderLine aProduct aCustomer calculatePrice getQuantity getProduct getPricingDetails getBasePrice calculateDiscounts getDiscountInfo aProduct Found message Participant Lifeline Return Activation Self call Message

Elements of Sequence Diagrams There is also notation for loops, conditions, etc. Name: Class New object Create Message Return Delete Self-call

Diagram Size (Cognitive Limit) Generally, a diagram is not useful if it contains more than about 25 boxes