Introduction to UML: Unified Modeling Language

Slides:



Advertisements
Similar presentations
UML an overview.
Advertisements

UML Class and Sequence Diagrams Violet Slides adapted from Marty Stepp, CSE 403, Winter 2012 CSE 403 Spring 2012 Anton Osobov.
Introduction To System Analysis and Design
UML: Unified Modeling Language
Irwin/McGraw-Hill Copyright © 2004 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS6th Edition.
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.
Kari R. Schougaard, PhD Stud. Værktøjer og Teknikker, 2006 UNIVERSITY OF AARHUS Department of Computer Science Unified Modeling Language Visual language.
ACM/JETT Workshop - August 4-5, 2005 UML Modeling using MagicDraw UML for Java Programmers.
Introduction To System Analysis and Design
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.
Introduction to UML: Unified Modeling Language Ric Holt U Waterloo, March 2009 CS246.
Fall 2010 CS4310 Requirements Engineering A Brief Review of UML & OO Dr. Guoqiang Hu Department of Computer Science UTEP 1.
Object-Oriented Modeling: Static Models. Object-Oriented Modeling Model the system as interacting objects Model the system as interacting objects Match.
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.
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)
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.
Introduction to OOAD and UML
Slide 1 Unified Modeling Language, Version 2.0 Object-Oriented SAD.
ER Diagrams ● Many different notations are available ● From wikipedia:wikipedia: Entity-relationship modelwikipedia: Entity-relationship model ● How do.
Engineering, 7th edition. Chapter 8 Slide 1 System models.
Use Cases UML. Use Cases What are Use Cases?  A statement of the functionality users expect and need, organized by functional units  Different from.
CompSci 280 S Introduction to Software Development
Introduction to UML.
Appendix 3 Object-Oriented Analysis and Design
CHAPTER
UML(Unified Modeling Language)
UML Diagrams By Daniel Damaris Novarianto S..
Evolution of UML.
Main issues: • What do we want to build • How do we write this down
Course Outcomes of Object Oriented Modeling Design (17630,C604)
Object-Oriented Analysis and Design
ניתוח ועיצוב מערכות תוכנה אביב 2014
Introduction to the Unified Modeling Language
Unified Modeling Language
Introduction to Unified Modeling Language (UML)
Introduction to Unified Modeling Language (UML)
University of Central Florida COP 3330 Object Oriented Programming
UML Diagrams Jung Woo.
Abstract descriptions of systems whose requirements are being analysed
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
UML: Unified modeling language
A tool for presentation of Architecture
A tool for presentation of Architecture
Object-Oriented Analysis
Component-Level Design
Component-Level Design
Systems Analysis and Design With UML 2
Introduction to UML.
Unified Modeling Language
Introduction to the Unified Modeling Language
Chapter 20 Object-Oriented Analysis and Design
CIS 375 Bruce R. Maxim UM-Dearborn
Appendix A Object-Oriented Analysis and Design
Introduction to the Unified Modeling Language
Software Construction Lecture 2
Analysis models and design models
Visual Modeling Using Rational Rose
Basic OOP Concepts and Terms
Introduction to UML Sources:
Chapter 22 Object-Oriented Systems Analysis and Design and UML
CIS 375 Bruce R. Maxim UM-Dearborn
Appendix A Object-Oriented Analysis and Design
Presentation transcript:

Introduction to UML: Unified Modeling Language Adapted from Ric Holt Thanks to Dr. Holt

Example UML Class Diagram http://www.agiledata.org/images/oo101ClassDiagram.gif

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] Diagrammatic semi-formal notation lacking formal semantics Analogy: Compare with building plans

Pros and Cons Pros Cons Intuitive and easy to understand Some tools for automated code generation available Tools for diagram manipulation available Can be used for test generation Can be refined to code Cons No formal semantics Not easily verifiable Unification of Heterogeneous diagrams

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)

3 Ways to Use UML (Both forward & reverse engineering) Sketch e.g. at white board Most common, quick and informal Communication & understanding Blueprint Detailed design, implemented by programmer May have tools supporting diagramming 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 Activity Class Communication Component Component structure Deployment Interaction Object Package Sequence State machine Timing Use case

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

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

Class Diagrams

Example UML Class Diagram http://www.agiledata.org/images/oo101ClassDiagram.gif

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

Kinds of Edges There are other kinds of edges Class A Class B Source Association Role of B Class A Class B Role of A Navigability Role name Role name Source Target Dependency Client Supplier There are other kinds of edges

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

Generalization (Inheritance) Supertype Subtype 1 Subtype 2

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

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 Participant Lifeline Found message aProduct Activation getPricingDetails Return getBasePrice Self call Message calculateDiscounts getDiscountInfo

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

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