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

Similar documents
Introduction to UML What is UML? Motivations for UML Types of UML diagrams UML syntax Descriptions of the various diagram types Rational Rose (IBM.. M

Metamodeling. Janos Sztipanovits ISIS, Vanderbilt University

Object Oriented Design. Program Design. Analysis Phase. Part 2. Analysis Design Implementation. Functional Specification

Model Driven Development Unified Modeling Language (UML)

CSE 403: Software Engineering, Spring courses.cs.washington.edu/courses/cse403/15sp/ UML Class Diagrams. Emina Torlak

SOFTWARE DESIGN COSC 4353 / Dr. Raj Singh

Unified Modeling Language (UML) Class Diagram

Class Diagram. Classes consist of. Note that class diagrams contain only classes, not objects.

Practical UML - A Hands-On Introduction for Developers

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

Introduction to Software Engineering. 5. Modeling Objects and Classes

Class Diagram. Classes consist of. Note that class diagrams contain only classes, not objects.

Practical UML : A Hands-On Introduction for Developers

Basic Structural Modeling. Copyright Joey Paquet,

Object-Oriented and Classical Software Engineering

A - 1. CS 494 Object-Oriented Analysis & Design. UML Class Models. Overview. Class Model Perspectives (cont d) Developing Class Models

ArchiMate 2.0. Structural Concepts Behavioral Concepts Informational Concepts. Business. Application. Technology

Modellistica Medica. Maria Grazia Pia, INFN Genova. Scuola di Specializzazione in Fisica Sanitaria Genova Anno Accademico

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

Unified Modeling Language (UML)

Today s Topic. Lecture 5. What is UML? Why Use UML. UML Diagrams. Introduction to UML. What is UML Why use UML? UML Diagrams

Introduction to Software Engineering. 5. Modeling Objects and Classes

CHAPTER 1. Topic: UML Overview. CHAPTER 1: Topic 1. Topic: UML Overview

Unified Modeling Language (UML)

UML Class Diagrams Revisited

UNIT II. Syllabus. a. An Overview of the UML: Visualizing, Specifying, Constructing, Documenting

Unified Modeling Language

Notation Part 1. Object Orientated Analysis and Design. Benjamin Kenwright

Architecture and the UML

Introduction to UML. Danang Wahyu utomo

Chapter 6: Entity-Relationship Model

Introducing the UML Eng. Mohammed T. Abo Alroos

Object-Oriented Design

UML: Unified Modeling Language

CHAPTER 5 CO:-Sketch component diagram using basic notations 5.1 Component Diagram (4M) Sample Component Diagram 5.2 Deployment Diagram (8M)

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

Chapter 2: Entity-Relationship Model

SOFTWARE ENGINEERING UML FUNDAMENTALS. Saulius Ragaišis.

Ingegneria del Software Corso di Laurea in Informatica per il Management. Introduction to UML

Software Service Engineering

Credit where Credit is Due. Goals for this Lecture. Introduction to Design

Relationships. Association Aggregation/Composition Multiplicity Dependencies

Object Oriented Modeling

A UML 2 Profile for Variability Models and their Dependency to Business Processes

IS 0020 Program Design and Software Tools

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

SEEM4570 System Design and Implementation. Lecture 10 UML

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

SEEM4570 System Design and Implementation Lecture 11 UML

to schedule pressure

UML Views of a System

OO Analysis and Design with UML 2 and UP

UNIT-II Introduction to UML

UML Tutorial. Unified Modeling Language UML Tutorial

Object-Oriented Software Engineering Practical Software Development using UML and Java

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

Test and Measurements System Modeling: Addressing the Root of the Problem

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

Chapter 5: Structural Modeling

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

Chapter 6: Entity-Relationship Model. E-R Diagrams

Lecture 17: (Architecture V)

Object-Oriented Systems Analysis and Design Using UML

OBJECT ORIENTED DESIGN with the Unified Process. Use Case Realization

Course 3 7 March

OMG Modeling Glossary B

Chapter 6: Entity-Relationship Model. The Next Step: Designing DB Schema. Identifying Entities and their Attributes. The E-R Model.

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

1. Introduction to Object Oriented Software Development

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

8/22/2003. Proposal for VPI model PSL assertion extensions

Graphical Notation for Topic Maps (GTM)

The Next Step: Designing DB Schema. Chapter 6: Entity-Relationship Model. The E-R Model. Identifying Entities and their Attributes.

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

S T R U C T U R A L M O D E L I N G ( M O D E L I N G A S Y S T E M ' S L O G I C A L S T R U C T U R E U S I N G C L A S S E S A N D C L A S S D I A

What is a Data Model?

Intro to Modelling and UML

UML 2.5: Specification Simplification

Advanced Class Diagrams and Intro to Interaction Modeling

Chapter 6: Entity-Relationship Model

Course "Softwaretechnik" Book Chapter 2 Modeling with UML

Principles of Software Construction: Objects, Design and Concurrency. Just enough UML. toad

CMPT 354 Database Systems I

JOURNAL OF OBJECT TECHNOLOGY

OO Techniques & UML Class Diagrams

For 100% Result Oriented IGNOU Coaching and Project Training Call CPD TM : ,

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

COMP 354: INTRODUCTION TO SOFTWARE ENGINEERING

Meltem Özturan

OBJECT ORIENTED DESIGN with the Unified Process. Use Case Realization

Unified Modeling Language (UML)

12 Tutorial on UML. TIMe TIMe Electronic Textbook

BASICS OF UML (PART-2)

Software Engineering Lab Manual

Unified Modeling Language (UML) and Modeling

Chapter No. 2 Class modeling CO:-Sketch Class,object models using fundamental relationships Contents 2.1 Object and Class Concepts (12M) Objects,

Analysis and Design with UML

UML-Based Conceptual Modeling of Pattern-Bases

Software Design Methodologies and Testing. (Subject Code: ) (Class: BE Computer Engineering) 2012 Pattern

UML Primer. -Elango Sundaram

Transcription:

COSC 3351 Software Design An Introduction to UML (I) This lecture contains material from: http://wps.prenhall.com/esm_pfleeger_softengtp_2 http://sunset.usc.edu/classes/cs577a_2000/lectures/05/ec-05.ppt Spring 2008 UML The UML is a graphical language for specifying visualizing constructing documenting the artifacts of software systems Added to the list of OMG adopted technologies in November 1997 as UML 1.1 Define an easy-to-learn but semantically rich visual modeling language Include ideas from other modeling languages Incorporate industry best practices Address contemporary software development issues scale, distribution, concurrency, executability, etc. Provide flexibility for applying different processes Enable model interchange and define repository interfaces 1

OMG UML Evolution composition (whole-part) relationship UML 2.0 2002 (planned) UML 2.0 Superstructure 2001 Q4 (planned) UML 2.0 Infrastructure UML 2.0 OCL Q1 2001 UML 1.4 dependency relationship 1999 UML 1.3 1998 Editorial revision without significant technical changes. UML 1.2 1997 (adopted by OMG) UML 1.1 From [Kobryn 01a]. Type of UML diagrams There are different types of UML diagram, each with slightly different syntax rules: use cases. class diagrams. sequence diagrams. package diagrams. state diagrams activity diagrams deployment diagrams. http://sunset.usc.edu/classes/cs577a_2000/lectures/05/ec-05.ppt 2

Different UML diagrams http://wps.prenhall.com/esm_pfleeger_softengtp_2 UML syntax (I) Actors: a UML actor indicates an interface (point of interaction) with the system. Actors may be people, or other systems. Actors used to group and name sets of system interactions. An actor is NOT part of the system. An actor is something external that your system has to deal with. Boxes: boxes are used variously throughout UML to indicate discrete elements, groupings and containment. http://sunset.usc.edu/classes/cs577a_2000/lectures/05/ec-05.ppt 3

UML syntax (II) Arrows: arrows usually indicate flow, dependency, association or generalization (depending on the type of diagram) Cardinality: applied to arrows, show relative numerical relationships between elements in a model: 1 to 1, 1 to many, etc. http://sunset.usc.edu/classes/cs577a_2000/lectures/05/ec-05.ppt UML syntax (III) Constraints: allow notation of arbitrary constraints on model elements. Used, for example, to constrain the value of a class attribute (a piece of data). Stereotypes: allow to extend the semantics of UML with English. A stereotype is usually a word or short phrase that describes what a diagram element does. That is, we mark an element with a word that will remind us of a common (stereotypical) role for that sort of thing. Stereotypes should always be applied consistently (with the same intended meaning in all instances). http://sunset.usc.edu/classes/cs577a_2000/lectures/05/ec-05.ppt 4

UML diagrams: use cases (I) A use case encodes a typical user interaction with the system. In particular, it: captures some user-visible function. achieves some concrete goal for the user. A complete set of use cases largely defines the requirements for a system: everything the user can see, and would like to do. The granularity of use cases determines the total number of use cases for the system. A clear design depends on showing the right level of detail. A use case maps actors to functions. The actors need not be people. http://sunset.usc.edu/classes/cs577a_2000/lectures/05/ec-05.ppt UML diagrams: use cases (II) Use case diagrams are helpful in three areas. determining features (requirements). New use cases often generate new requirements as the system is analyzed and the design takes shape. communicating with clients. Their notational simplicity makes use case diagrams a good way for developers to communicate with clients. generating test cases. The collection of scenarios for a use case may suggest a suite of test cases for those scenarios. 5

UML diagrams: use cases (III) Example: Relationships in a news web site http://sunset.usc.edu/classes/cs577a_2000/lectures/05/ec-05.ppt UML diagrams: use cases (IV) The notes between << >> marks are stereotypes: identifiers added to make the diagram more informative. Here they differentiate between different roles (ie, different meanings of an arrow in this diagram). http://sunset.usc.edu/classes/cs577a_2000/lectures/05/ec-05.ppt 6

What is structural modeling? Structural model: a view of a system that emphasizes the structure of the objects, including their classifiers, relationships, attributes and operations. Structural Modeling: Core Elements Construct Description class a description of a set of objects that share the same attributes, operations, methods, relationships and semantics. interface a named set of operations that characterize the behavior of an element. component a modular, replaceable and significant part of a system that packages implementation and exposes a set of interfaces. node a run-time physical object that represents a computational resource. Syntax «interface» 7

Structural Modeling: Core Elements (cont d) Construct Description constraint¹ a semantic condition or restriction. Syntax {constraint} ¹ An extension mechanism useful for specifying structural elements. Structural Modeling: Core Relationships Construct Description Syntax association aggregation composition generalization a relationship between two or more classifiers that involves connections among their instances. A special form of association that specifies a whole-part relationship between the aggregate (whole) and the component part. strong association in which the part can belong to only one whole a taxonomic relationship between a more general and a more specific element. 8

Structural Modeling: Core Relationships (II) Construct Description Syntax realization dependency Cardinality a relationship between a specification and its implementation. a relationship between two modeling elements, in which a change to one modeling element (the independent element) will affect the other modeling element (the dependent element). 1 0..* Exactly one Zero or more 1..* 0..1 2..7 One or more Zero or one Specified range Structural Diagram Tour Show the static structure of the model the entities that exist (e.g., classes, interfaces, components, nodes) internal structure relationship to other entities Do not show temporal information Kinds static structural diagrams class diagram object diagram implementation diagrams component diagram deployment diagram 9

Class diagrams - example Class diagrams (II) UML class notation is a rectangle divided into three parts: class name, attributes, and operations. Names of abstract classes, such as Payment, are in italics. Relationships between classes are the connecting links. 10

Class diagrams (III) Our class diagram has three kinds of relationships. Association: a relationship between instances of the two classes. There is an association between two classes if an instance of one class must know about the other in order to perform its work. Aggregation: an association in which one class belongs to a collection. An aggregation has a diamond end pointing to the part containing the whole. Generalization: an inheritance link indicating one class is a superclass of the other. A generalization has a triangle pointing to the superclass. Class diagrams (IV) A navigability arrow on an association shows which direction the association can be traversed or queried. An OrderDetail can be queried about its Item, but not the other way around. The arrow also lets you know who "owns" the association's implementation; in this case, OrderDetail has an Item. Associations with no navigability arrows are bidirectional. The multiplicity of an association end is the number of possible instances of the class associated with a single instance of the other end. Multiplicities are single numbers or ranges of numbers. In our example, there can be only one Customer for each Order, but a Customer can have any number of Orders. 11

Class Diagrams (V) Associations in which an object is part of a whole are aggregations. Composition is a strong association in which the part can belong to only one whole -- the part cannot exist without the whole. Composition is denoted by a filled diamond at the whole end. This diagram shows that a BoxOffice belongs to exactly one MovieTheater. Destroy the MovieTheater and the BoxOffice goes away! The collection of Movies is not so closely bound to the MovieTheater. Class information: visibility and scope The illustration uses the following UML conventions. Static members are underlined. Instance members are not. The operations follow this form: <access specifier> <name> ( <parameter list>) : <return type> The parameter list shows each parameter type preceded by a colon. Access specifiers appear in front of each member. 12