4. UML. CPSC 333: Foundations of Software EngineeringJ. Denzinger 4.1. Motivation The Unified Modeling Language tries to integrate older approaches Developed.

Slides:



Advertisements
Similar presentations
ARCH-05 Application Prophecy UML 101 Peter Varhol Principal Product Manager.
Advertisements

A Brief Introduction. Acknowledgements  The material in this tutorial is based in part on: Concurrency: State Models & Java Programming, by Jeff Magee.
Unified Modeling Language
Object-Oriented Analysis and Design
UML – Class Diagrams.
1 © Wolfgang Pelz UML3 UML 3 Notations describe how to use reusable software. Package Component Deployment Node.
L4-1-S1 UML Overview © M.E. Fayad SJSU -- CmpE Software Architectures Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I.
Copyright W. Howden1 Lecture 11: UML Terminology and Additional Models and Notation.
Lecture 11: Chapter 22 Topics –Object Oriented Modeling –UML –Use case.
Unified Modeling (Part I) Overview of UML & Modeling
Component and Deployment Diagrams
UML Notations Activity diagrams State diagrams Class diagrams Use-case diagrams.
Developed by Reneta Barneva, SUNY Fredonia Component Level Design.
Ch4: Software Architecture and Design. 1 The role of analysis and design  Software construction may be partitioned into the following phases:  Req.
1 CS 501 Spring 2002 CS 501: Software Engineering Lecture 16 Object Oriented Design I.
ACM/JETT Workshop - August 4-5, 2005 UML Modeling using MagicDraw UML for Java Programmers.
COMS W4156: Advanced Software Engineering
Basic Concepts The Unified Modeling Language (UML) SYSC System Analysis and Design.
Objectives Design Class Diagrams Issues in system design Generalization Review UML papers.
UML Unified Markup Language Ziya Karakaya Atılım University, Computer Engineering
1COM6030 Systems Analysis and Design © University of Sheffield 2005 COM 6030 Software Analysis and Design Lecture 4 - System modelling Dr Richard Clayton.
Unified Modeling Language, Version 2.0
Lecture 3: Visual Modeling & UML 1. 2 Copyright © 1997 by Rational Software Corporation Computer System Business Process Order Item Ship via “ Modeling.
Object Management Group (OMG) Specifies open standards for every aspect of distributed computing Multiplatform Model Driven Architecture (MDA)
1 UML Basic Training. UML Basic training2 Agenda  Definitions: requirements, design  Basics of Unified Modeling Language 1.4  SysML.
Process Modeling Calgary 2004 Prof.Dr.Michael M. Richter Chapter 3 Additions.
Unified Modeling Language* Keng Siau University of Nebraska-Lincoln *Adapted from “Software Architecture and the UML” by Grady Booch.
Modeling Component-based Software Systems with UML 2.0 George T. Edwards Jaiganesh Balasubramanian Arvind S. Krishna Vanderbilt University Nashville, TN.
1 Advanced Software Architecture Muhammad Bilal Bashir PhD Scholar (Computer Science) Mohammad Ali Jinnah University.
UML Diagrams A tool for presentation of Architecture.
UML Class Diagram Trisha Cummings. What we will be covering What is a Class Diagram? Essential Elements of a UML Class Diagram UML Packages Logical Distribution.
An Introduction to the Unified Modeling Language
Course Instructor: Kashif Ihsan 1. Chapter # 3 2.
UML as a Specification Language for Embedded Systems. By, Mir Ahmed Ali, Asst. Professor, ECM department, SNIST. By, Prof. Narsiah sir, Director of School.
SWT - Diagrammatics Lecture 4/4 - Diagramming in OO Software Development - partB 4-May-2000.
Logical view –show classes and objects Process view –models the executables Implementation view –Files, configuration and versions Deployment view –Physical.
Unified Modeling Language. Object Oriented Methods ► What are object-oriented (OO) methods?  OO methods provide a set of techniques for analyzing, decomposing,
Design Model Lecture p6 T120B pavasario sem.
Introduction to UML CS A470. What is UML? Unified Modeling Language –OMG Standard, Object Management Group –Based on work from Booch, Rumbaugh, Jacobson.
Unified Modelling Language (UML) Software Engineering Lab. Sharif University of Technology.
Software Engineering Lecture 8 Object-Oriented Analysis.
(14-2) UML Instructor - Andrew O’Fallon CptS 122 (December 2, 2015) Washington State University.
Lecture 9-1 : Intro. to UML (Unified Modeling Language)
Week 04 Object Oriented Analysis and Designing. What is a model? A model is quicker and easier to build A model can be used in simulations, to learn more.
Object Oriented Analysis and Design 1 Chapter 9 From Design to Implementation  Implementation Model  Forward, Reverse, and Round-Trip Engineering  Mapping.
INFO 620Lecture #71 Information Systems Analysis and Design Design Class Diagrams and others INFO 620 Glenn Booker.
UML (Unified Modeling Language)
CSCI 3428: Software Engineering Tami Meredith UML Unified Modeling Language.
Object Oriented Programming and Data Abstraction Earl Huff Rowan University.
UML Fundamental Elements. Structural Elements Represent abstractions in our system. Elements that encapsulate the system's set of behaviors. Structural.
1 SYS366 Week 2 - Lecture 2 Visual Modeling & 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.
Introduction to Unified Modeling Language (UML) By Rick Mercer with help from The Unified Modeling Language User Guide, Grady Booch, James Rumbaugh, Ivar.
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 14 Slide 1 Object-Oriented Design.
1 IS 0020 Program Design and Software Tools Unified Modeling Language Lecture 13 April 13, 2005.
1 IS 0020 Program Design and Software Tools Unified Modeling Language Lecture 13 November 30, 2004.
1 Design Object Oriented Solutions Object Oriented Analysis & Design Lecturer: Mr. Mohammed Elhajj
Introduction to UML.
UNIT 1.
Course Outcomes of Object Oriented Modeling Design (17630,C604)
Object-Oriented Analysis and Design
Unified Modeling Language
Introduction to Unified Modeling Language (UML)
Software Architecture & Design Pattern
Introduction to Object Oriented Analysis, Design and Unified Modeling Language (UML) Shanika Karunasekera.
Unified Modeling Language
IMPORTANT NOTICE TO STUDENTS:
Analysis models and design models
Software Development Process Using UML Recap
Presentation transcript:

4. UML

CPSC 333: Foundations of Software EngineeringJ. Denzinger 4.1. Motivation The Unified Modeling Language tries to integrate older approaches Developed by Rational (CASE tool) they hired Booch, Rumbaugh, Jacobsen Standardized at version 1.1 by the OMG (Object Management Group) Supported by almost all OO CASE tools … but with some limitations … Currently it is at version 1.4 (OMG working on 2.0)

CPSC 333: Foundations of Software EngineeringJ. Denzinger Goals of UML Provide users with ready-to-use, expressive visual modeling language to develop and exchange meaningful models. Provide extensibility and specialization mechanisms to extend the core concepts. Be independent of particular languages and processes. Provide formal basis for understanding the modeling language. Encourage the growth of the OO tools market. Support higher-level development concepts such as collaborations, frameworks, patterns and components. Integrate best practices.

CPSC 333: Foundations of Software EngineeringJ. Denzinger UML has 9 kinds of diagrams  Class Diagram  Object Diagram  Component Diagram  Deployment Diagram  Use Case Diagram  Sequence Diagram  Collaboration Diagram  Statechart Diagram  Activity Diagram Structural Diagrams Behavioral Diagrams

CPSC 333: Foundations of Software EngineeringJ. Denzinger 4.2. Structural diagrams Class diagram Central for OO modeling Shows static structure of the system Types (!) of objects Static relationships (see next lecture)  Association (e.g.: a company has many employees)  Generalization (subtypes) (e.g.: an employee is a kind of person)  Dependencies (e.g.: a company is using trucks to ship products)

CPSC 333: Foundations of Software EngineeringJ. Denzinger Class Set of objects Defines name attributes (optional: type optional: initial value) operations Task startDate: Date = default endDate: Date name setStartDate (d : Date) setEndDate (d : Date) getDuration () : Date

CPSC 333: Foundations of Software EngineeringJ. Denzinger Class diagram example Light off( ) on( ) HeaterCooler Environmental Controller define_climate( ) terminate_climate( ) 0..* SystemLog display( ) recordEvent( ) Actuator startUp( ) shutDown( ) Temperature generalization aggregation association

CPSC 333: Foundations of Software EngineeringJ. Denzinger Three Perspectives We can look at classes from these perspectives: Conceptual (OOAnalysis) Shows concepts of the domain Should be independent from implementation Specification (OODesign) General structure of the running system Interfaces of software (types, not classes) Often: Best perspective Implementation (OOProgramming) Structure of the implementation (classes) Most often used Try to draw from a clear, single perspective

CPSC 333: Foundations of Software EngineeringJ. Denzinger Attributes Conceptual: Indicates that customer have names Specification: Customer can tell you the name and set it (short for get/set methods) Implementation: An instance variable is available Customer name address creditRating

CPSC 333: Foundations of Software EngineeringJ. Denzinger Operations Services that a class knows to carry out Correspond to messages of the class (or IF) Conceptual level principal responsibilities Specification level public messages = interface of the class Normally: Don’t show operations that manipulate attributes

CPSC 333: Foundations of Software EngineeringJ. Denzinger UML syntax for operations visibility name (parameter list) : return-type-expression + assignAgent (a : Agent) : Boolean visibility: public (+), protected (#), private (-)  Interpretation is language dependent  Not needed on conceptual level name: string parameter list: arguments (syntax as in attributes) return-type-expression: language-dependent specification

CPSC 333: Foundations of Software EngineeringJ. Denzinger Operations vs. Responsibilities Conceptual: Operations should specify responsibilities, not IF, e.g.: The Customer specifies the Orders The Orders list the Customer * 1 Order dateReceived isPrepaid number : String price : Money Responsibilities - lists the customer UML 1.3 Specific (similar to CRC Cards) Customer name address Responsibilities - specifies orders

CPSC 333: Foundations of Software EngineeringJ. Denzinger Class versus type Type protocol understood by an object set of operations that are used Class implementation oriented construct implements one or more types In Java a type is an interface, in C++ a type is an abstract class UML 1.3 has the > stereotype and the lollipop

CPSC 333: Foundations of Software EngineeringJ. Denzinger Interfaces in UML (1) Stereotype > InputStream {abstract} OrderReader Data InputStream Realization Dependency Generalization > DataInput close()

CPSC 333: Foundations of Software EngineeringJ. Denzinger Interfaces in UML (2) OrderReader Data InputStream Dependency DataInput Interface Lollipops (“short-hand notation”)

CPSC 333: Foundations of Software EngineeringJ. Denzinger Systems and subsystems System Design

CPSC 333: Foundations of Software EngineeringJ. Denzinger test status request for alarm notification periodic check-in require for configuration update request for status Control panel subsystem Sensor subsystem Central communication subsystem request for system status specification of type of alarm periodic status check Systems and Sub-Systems

CPSC 333: Foundations of Software EngineeringJ. Denzinger How to break a system into smaller subsystems? Roman principle: Divide & conquer –Split up a large system into manageable parts In structured methods: functional decomposition In OO: Group classes into higher level units Packages (conceptual; at development time) Components (physical; at run time)

CPSC 333: Foundations of Software EngineeringJ. Denzinger Packages General purpose mechanism for organizing elements into groups Package forms a namespace Names are unique within ONE package UML assumes an anonymous root package Resource Pool

CPSC 333: Foundations of Software EngineeringJ. Denzinger Package vs. Component Packages Conceptual structuring of system model Source code structure Components “Physical and replaceable part of the system that conforms to and provides the realization of a set of interfaces”, e.g.:  COM+ components, Java Beans, …  source code files  Documents

CPSC 333: Foundations of Software EngineeringJ. Denzinger Component diagrams Component representation resourcePool.java buglist.dll Realizes: BugList FilteredList System::kernel.dll {version=1.23} path name

CPSC 333: Foundations of Software EngineeringJ. Denzinger Example Diagram

CPSC 333: Foundations of Software EngineeringJ. Denzinger Components vs. classes Both have names and realize interfaces Class logical abstraction Attributes and operations Component Physical thing that exist on machines Physical packaging of logical things (classes, interfaces, …) Only has operations (only reachable thru its IF)

CPSC 333: Foundations of Software EngineeringJ. Denzinger Components and interfaces IFs used in all component-based OS-facilities (COM+, CORBA, EJB) ProjectMgt.javaresourcePool.java ResourcePool ResourcePool = import interface for ProjectMgt.java ResourcePool = export interface for resourcePool.java Dependency Interface Realization

CPSC 333: Foundations of Software EngineeringJ. Denzinger Alternative representation ProjectMgt.javaresourcePool.java ResourcePool = import interface for ProjectMgt.java ResourcePool = export interface for resourcePool.java Dependency Realization > ResourcePool addEmployee()

CPSC 333: Foundations of Software EngineeringJ. Denzinger Deployment diagrams Show physical relationship among software & hardware components Show where components of a distributed system are located

CPSC 333: Foundations of Software EngineeringJ. Denzinger Deployment diagrams (2) Nodes: Computational units (most often: Hardware) Connections: Communication paths over which the system will interact Client TCP/IP Server

CPSC 333: Foundations of Software EngineeringJ. Denzinger Nodes and components Account Server Deploys AccountDB.java AccountMgt.java Account Server AccountMgt.javaAccountDB.java

CPSC 333: Foundations of Software EngineeringJ. Denzinger Kiosk Account Server Kiosk 0..* 1 1 SalesTerminal