Unified Modelling Language (UML)

Slides:



Advertisements
Similar presentations
® IBM Software Group © 2006 IBM Corporation Rational Software France Object-Oriented Analysis and Design with UML2 and Rational Software Modeler 04. Other.
Advertisements

UML: An Introduction.
2008/03/25 Unified Modeling Lanauage 1 Introduction to Unified Modeling Language (UML) – Part One Ku-Yaw Chang Assistant Professor.
Object-Oriented Analysis and Design
Chapter 15: System Modeling with UML
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.
CS 501: Software Engineering Fall 2000 Lecture 11 Object-Oriented Design I.
Unified Modeling (Part I) Overview of UML & Modeling
C++ Training Datascope Lawrence D’Antonio Lecture 11 UML.
© Copyright Eliyahu Brutman Programming Techniques Course.
Advanced Behavioral Modeling
SE-565 Software System Requirements More UML Diagrams.
1 CS 501 Spring 2002 CS 501: Software Engineering Lecture 16 Object Oriented Design I.
The definition and history of creating the UML Lection №1.
UML Sequence Diagrams Michael L. Collard, Ph.D. Department of Computer Science Kent State University.
1 Introduction to UML DIAGRAMS & CLASS DIAGRAM Chapter 7,8 主講人 : 許勝杰
2005/05/25 Unified Modeling Lanauage 1 Introduction to Unified Modeling Language (UML) – Part One Ku-Yaw Chang Assistant Professor.
UML Unified Markup Language Ziya Karakaya Atılım University, Computer Engineering
Introduction to the Unified Modeling Language “The act of drawing a diagram does not constitute analysis or design. … Still, having a well-defined and.
Unified Modeling Language User Guide Section 1—Getting Started.
Programming Logic and Design Fourth Edition, Comprehensive Chapter 15 System Modeling with the UML.
Software Engineering Prof. Ing. Ivo Vondrak, CSc. Dept. of Computer Science Technical University of Ostrava
Unified Modeling Language* Keng Siau University of Nebraska-Lincoln *Adapted from “Software Architecture and the UML” by Grady Booch.
ניתוח מערכות מידע 1 Unified Modeling Language (UML) § § The Unified Modeling Language (UML) is the industry-standard language for: Specifying, Visualizing,
UML Advanced Structural Modeling II
16 August, 2007Information System Design IT60105, Autumn 2007 Information System Design IT60105 Lecture 7 Unified Modeling Language.
L6-S1 UML Overview 2003 SJSU -- CmpE Advanced Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College.
Unified Modeling Language
TAL7011 – Lecture 4 UML for Architecture Modeling.
Implementation Diagrams
1 The Unified Modeling Language. 2 The Unified Modeling Language (UML) is a standard language for writing software blueprints. The UML may be used to.
Logical view –show classes and objects Process view –models the executables Implementation view –Files, configuration and versions Deployment view –Physical.
Design Model Lecture p6 T120B pavasario sem.
Unified Modelling Language (UML) Software Engineering Lab. Sharif University of Technology.
Ch- 8. Class Diagrams Class diagrams are the most common diagram found in modeling object- oriented systems. Class diagrams are important not only for.
Software Engineering Lecture 8 Object-Oriented Analysis.
OMT Modeling 1. Object Model : presented by the object model and the data dictionary. 2. Dynamic Model: presented by the state diagrams and event flow.
 Building Block Building Block  Things in the UML Things in the UML  Structural Things Structural Things  Behavioral Things Behavioral Things  Grouping.
1 Technical & Business Writing (ENG-715) Muhammad Bilal Bashir UIIT, Rawalpindi.
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.
Chapter 3: Introducing the UML
ITEC0724 Modern Related Technology on Mobile Devices Lecture Notes #2 1.
Introduction to UML Hazleen Aris Software Eng. Dept., College of IT, UNITEN. …Unified Modeling Language.
1 Architectural Blueprints—The “4+1” View Model of Software Architecture (
Object Oriented Programming and Data Abstraction Earl Huff Rowan University.
Diagrams. Typically, we view the static parts of a system using one of the four following diagrams. 1. Class diagram 2. Object diagram 3. Component diagram.
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.
ITEC1301 Object-Oriented Systems Construction Lecture Notes #4 1.
UML (Unified Modeling Language)
R R R CSE870: UML Component Diagrams Implementation Diagrams.
M. ARIFUR RAHMAN OBJECT ORIENTED ANALYSIS & DESIGN 1.0 System Modeling.
UML Chapter 17.
CHAPTER
UML Diagrams By Daniel Damaris Novarianto S..
Course Outcomes of Object Oriented Modeling Design (17630,C604)
Object-Oriented Analysis and Design
UML: An Introduction.
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
Unified Modeling Language
Introduction to Unified Modeling Language (UML)
UML Diagrams Jung Woo.
Interactions.
The Unified Modeling Language
Unified Modeling Language
UNIT – V.
Analysis models and design models
Design Yaodong Bi.
CS 501: Software Engineering
Presentation transcript:

Unified Modelling Language (UML) Kavoshgaran 1

Why We Model ? A model is a simplification of reality. We build models so that we can better understand the system we are developing Benefits: Models help us to visualize a system as it is or as we want it to be. Models permit us to specify the structure or behavior of a system. Models give us a template that guides us in constructing a system. Models document the decisions we have made.

Principles of Modeling First: The choice of what models to create has a profound influence on how a problem is attacked and how a solution is shaped . Second:  Every model may be expressed at different levels of precision. Third: The best models are connected to reality. Fourth: No single model is sufficient. Every nontrivial system is best approached through a small set of nearly independent models.

Introducing the UML The UML is a language for Visualizing Specifying Constructing Documenting

Building Blocks of the UML The vocabulary of the UML encompasses three kinds of building blocks:   Things Relationships Diagrams

Things in the UML Structural things Behavioral things Grouping things Annotational things

Structural Things Structural things are the nouns of UML models. These are the mostly static parts of a model, representing elements that are either conceptual or physical. In all, there are seven kinds of structural things. Includes: Classes Interfaces Collaborations Use Case Component Node

Behavioral Things Behavioral Things Behavioral things are the dynamic parts of UML models. These are the verbs of a model, representing behavior over time and space. In all, there are two primary kinds of behavioral things. Includes: interaction state machine States

Grouping Things Grouping things are the organizational parts of UML models. These are the boxes into which a model can be decomposed. In all, there is one primary kind of grouping thing, namely, packages. Includes: Packages

Annotational Things Annotational things are the explanatory parts of UML models. These are the comments you may apply to describe, illuminate, and remark about any element in a model. Includes: Notes

Relationships in the UML Dependency Association Generalization Realization

Dependency? dependency is a semantic relationship between two things in which a change to one thing (the independent thing) may affect the semantics of the other thing.

Association? association is a structural relationship that describes a set of links, a link being a connection among objects. Aggregation is a special kind of association, representing a structural relationship between a whole and its parts.

Generalization? a generalization is a specialization/generalization relationship in which objects of the specialized element (the child) are substitutable for objects of the generalized element (the parent).

Realization? a realization is a semantic relationship between classifiers, wherein one classifier specifies a contract that another classifier guarantees to carry out. classifier: A mechanism that describes structural and behavioral features. Classifiers include classes, interfaces, datatypes, signals, components, nodes, use cases, and subsystems.

Diagrams in the UML A diagram is the graphical presentation of a set of elements, most often rendered as a connected graph of vertices (things) and arcs (relationships). UML includes nine such diagrams:   Class diagram Object diagram Use case diagram Sequence diagram Collaboration diagram Statechart diagram Activity diagram Component diagram Deployment diagram

Diagrams in the UML A class diagram shows a set of classes, interfaces, and collaborations and their relationships. These diagrams are the most common diagram found in modeling object-oriented systems. Class diagrams address the static design view of a system. Class diagrams that include active classes address the static process view of a system. An object diagram shows a set of objects and their relationships. Object diagrams represent static snapshots of instances of the things found in class diagrams. These diagrams address the static design view or static process view of a system as do class diagrams, but from the perspective of real or prototypical cases. A use case diagram shows a set of use cases and actors (a special kind of class) and their relationships. Use case diagrams address the static use case view of a system. These diagrams are especially important in organizing and modeling the behaviors of a system.

Diagrams in the UML sequence diagrams and collaboration diagrams are kinds of interaction diagrams. An interaction diagram shows an interaction, consisting of a set of objects and their relationships, including the messages that may be dispatched among them. Interaction diagrams address the dynamic view of a system. A sequence diagram is an interaction diagram that emphasizes the time-ordering of messages; a collaboration diagram is an interaction diagram that emphasizes the structural organization of the objects that send and receive messages. Sequence diagrams and collaboration diagrams are isomorphic, meaning that you can take one and transform it into the other. A statechart diagram shows a state machine, consisting of states, transitions, events, and activities. Statechart diagrams address the dynamic view of a system. They are especially important in modeling the behavior of an interface, class, or collaboration and emphasize the event-ordered behavior of an object, which is especially useful in modeling reactive systems. An activity diagram is a special kind of a statechart diagram that shows the flow from activity to activity within a system. Activity diagrams address the dynamic view of a system. They are especially important in modeling the function of a system and emphasize the flow of control among objects.

Diagrams in the UML A component diagram shows the organizations and dependencies among a set of components. Component diagrams address the static implementation view of a system. They are related to class diagrams in that a component typically maps to one or more classes, interfaces, or collaborations. A deployment diagram shows the configuration of run-time processing nodes and the components that live on them. Deployment diagrams address the static deployment view of an architecture. They are related to component diagrams in that a node typically encloses one or more components.

Common Mechanisms in the UML Specifications Adornments Common divisions Extensibility mechanisms Specifications :behind every part of its graphical notation there is a specification that provides a textual statement of the syntax and semantics of that building block. Adornments:Most elements in the UML have a unique and direct graphical notation that provides a visual representation of the most important aspects of the element. Common Divisions: In modeling object-oriented systems, the world often gets divided in at least a couple of ways.

Extensibility Mechanisms Includes: Stereotypes Tagged values Constraints A stereotype extends the vocabulary of the UML, allowing you to create new kinds of building blocks that are derived from existing ones but that are specific to your problem. A tagged value extends the properties of a UML building block, allowing you to create new information in that element's specification. A constraint extends the semantics of a UML building block, allowing you to add new rules or modify existing ones.

Extensibility Mechanisms

Architecture Architecture is the set of significant decisions about The organization of a software system The selection of the structural elements and their interfaces by which the system is composed Their behavior, as specified in the collaborations among those elements The composition of these structural and behavioral elements into progressively larger subsystems The architectural style that guides this organization: the static and dynamic elements and their interfaces, their collaborations, and their composition

Modeling a System's Architecture (4+1)

Classes

Class Diagram Content: Common Use: Classes Interfaces Collaborations Dependency, generalization, and association relationships Common Use: To model the vocabulary of a system To model simple collaborations To model a logical database schema

Class Diagram

Modeling Simple Collaborations

Modeling a Logical Database Schema

Advanced Classes

Classifier A classifier is a mechanism that describes structural and behavioral features. Classifiers include classes, interfaces, datatypes, signals, components, nodes, use cases, and subsystems.

Template Class

Visibility

Advanced Relationships A dependency is a using relationship, specifying that a change in the specification of one thing (for example, class SetTopController ) may affect another thing that uses it.

Forward and Reverse Engineering public abstract class EventHandler {   EventHandler successor;   private Integer currentEventID;  private String source;    EventHandler() {}  public void handleRequest() {}   }

Abstract, Root, Leaf, and Polymorphic Elements

Multiplicity

Modeling the Semantics of a Class Specify the responsibilities of the class Specify the semantics of the class as a whole Specify the body of each method Specify the pre- and postconditions of each operation, plus the invariants of the class as a whole Specify a state machine for the class Specify a collaboration that represents the class Specify the pre- and postconditions of each operation, plus the invariants of the class as a whole, using a formal language such as OCL.

Interfaces

Roles

Modeling the Seams in a System

Modeling Static Types

Modeling Dynamic Types

Packages package is a general purpose mechanism for organizing modeling elements into groups.

Simple and Extended Package

Owned Elements

Importing and Exporting

Generalization Among Packages

Modeling Groups of Elements

Modeling Architectural Views

Interaction Diagrams An interaction diagram shows an interaction, consisting of a set of objects and their relationships, including the messages that may be dispatched among them. A sequence diagram is an interaction diagram that emphasizes the time ordering of messages . A collaboration diagram is an interaction diagram that emphasizes the structural organization of the objects that send and receive messages.

Interaction Diagrams

Sequence Diagrams

Collaboration Diagrams

Modeling Flows of Control by Time Ordering

Modeling Flows of Control by Organization

Forward and Reverse Engineering public void register() { CourseCollection c = getSchedule(); for (int i = 0; i < c.size(); i++) c.item(i).add(this); this.registered = true; }

Activity Diagrams Activity diagrams are one of the five diagrams in the UML for modeling the dynamic aspects of systems. An activity diagram is essentially a flowchart, showing flow of control from activity to activity. Common Use Modeling a workflow Modeling an operation.

Activity Diagrams

Action States Action states can't be decomposed. Furthermore, action states are atomic, meaning that events may occur, but the work of the action state is not interrupted.

Activity States activity states can be further decomposed, their activity being represented by other activity diagrams.

Transitions When the action or activity of a state completes, flow of control passes immediately to the next action or activity state.

Branching sequential transitions are common, but they aren't the only kind of path you'll need to model a flow of control.

Forking and Joining

Swimlanes

Object Flow

Modeling a Workflow

Modeling an Operation Point Line::intersection (l : Line) { if (slope == l.slope) return Point(0,0); int x = (l.delta - delta) / (slope - l.slope); int y = (slope * x) + delta; return Point(x, y); }

Events and Signals An event is the specification of a significant occurrence that has a location in time and space. A signal, the passing of time, and a change of state are asynchronous events, representing events that can happen at arbitrary times.

Signals

Call Events

Time and Change Events

State Machines

States

Transitions

Advanced States and Transitions

Substates

History States

Concurrent Substates

Modeling the Lifetime of An Object

Components

Simple and Extended Components

Components and Interfaces

Modeling Executables and Libraries

Modeling Tables, Files, and Documents

Modeling an API

Modeling Source Code

Node A node is a physical element that exists at run time and represents a computational resource, generally having at least some memory and, often, processing capability.

Nodes and Components

Connections

Processors and Devices

Modeling the Distribution of Components

Deployment Diagram

Modeling a Client/Server System

Modeling a Fully Distributed System