COP4331UML Lecture Presented By: Antoniya Petkova 9/11/2009 Originally Prepared By: Pengju Shang for EEL5881 Software Engineering I.

Slides:



Advertisements
Similar presentations
UML an overview.
Advertisements

ARCH-05 Application Prophecy UML 101 Peter Varhol Principal Product Manager.
Chapter 4 - Object-Oriented Analysis and Design in a Nutshell1 Chapter 4 Object-Oriented Analysis and Design in a Nutshell.
Introduction to UML. Acknowledgements Slides material are taken from different sources including: Slides material are taken from different sources including:
Lecturer: Sebastian Coope Ashton Building, Room G.18 COMP 201 web-page: Lecture.
Slide 10A.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
Irwin/McGraw-Hill Copyright © 2004 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS6th Edition.
The Unified Modeling Language
© Copyright Eliyahu Brutman Programming Techniques Course.
Itntroduction to UML, page 1 Introduction to UML.
Unified Modeling Language
Introduction to UML Prashanth Aedunuthula Fall, 2004.
Unified Modeling Language(UML) BY
Introduction to UML Shiyuan Jin Fall, 2006.
UML Diagrams Computer Science I.
Slide 16A.1 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering.
CSCI-383 Object-Oriented Programming & Design Lecture 9.
CIT UPES | Sept 2013 | Unified Modeling Language - UML.
Intro to UML - OO Class Diagrams Week 5 CMIS570. Plan for Tonight Object terms Unified Modeling Language history Class Diagrams Intro to Oracle Oracle.
1 Chapter 2 (Cont.) The BA’s Perspective on Object Orientation.
CS 360 Lecture 6.  A model is a simplification of reality  We build models to better understand the system being developed.  We build models of complex.
Unified Modeling Language, Version 2.0
Lecture 7 Object Oriented Design. Outline  What is UML and why we use UML?  How to use UML diagrams to design software system?  What UML Modeling tools.
Copyright 2002 Prentice-Hall, Inc. Chapter 2 Object-Oriented Analysis and Design Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey.
Lab 04.
EEL5881 Software Engineering I UML Lecture Yi Luo.
UML Use Case Diagramming Guidelines. What is UML? The Unified Modeling Language (UML) is a standard language for specifying, visualizing, constructing,
Class diagram Used for describing structure and behaviour in the use cases Provide a conceptual model of the system in terms of entities and their relationships.
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.
Design Jon Walker. More UML ● What is UML again?
SWT - Diagrammatics Lecture 4/4 - Diagramming in OO Software Development - partB 4-May-2000.
Unified Modeling Language. Object Oriented Methods ► What are object-oriented (OO) methods?  OO methods provide a set of techniques for analyzing, decomposing,
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.
(14-2) UML Instructor - Andrew O’Fallon CptS 122 (December 2, 2015) Washington State University.
1 Unified Modeling Language, Version 2.0 Chapter 2.
Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall Object-Oriented Systems Analysis and Design Using UML Systems Analysis and Design,
Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich, Jeffrey A.
CSCI 3428: Software Engineering Tami Meredith UML Unified Modeling Language.
Introduction to UML Created By: Ajay Bahoriya. Acknowledgements Slides material are taken from different sources including: Slides material are taken.
CS 501: Software Engineering Fall 1999 Lecture 15 Object-Oriented Design I.
Basic Characteristics of Object-Oriented Systems
UML. Model An abstract representation of a system. Types of model 1.Use case model 2.Domain model 3.Analysis object model 4.Implementation model 5.Test.
Lecture 13. Unified Modeling Language (UML) The first applications you wrote in CS201 were easy to think out and code with no intermediate steps. Lab.
SWE 214 (071) Introduction to UML Slide 1 Introduction to UML.
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.
System modeling and the Unified Modeling Language (UML) CS
UML CSE 470 : Software Engineering. Unified Modeling Language UML is a modeling language to express and design documents, software –Particularly useful.
Introduction to UML Mohammad Zubair Ahmad Summer 2007.
Slide 1 Unified Modeling Language, Version 2.0 Object-Oriented SAD.
 Class and Diagram  Representation of Class Name Attributes Operations  Visibility of Attributes and Operations.
Unified Modeling Language (UML)
UML-Class Diagrams. UML-Class Diagrams Order placement problem A Company has two types of customers, corporate customers and personal customers. All.
Introduction to UML Majid Ali Khan Spring 2005 Introduce myself.
Object-Oriented Analysis and Design
Object-Oriented Modeling with UML
Unified Modeling Language
Introduction to UML Shiyuan Jin Spring, 2006.
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
Introduction to UML Introduction to UML Shiyuan Jin September,23,2002
Sequence Diagrams.
Software models and the Unified Modeling Language (UML)
Software Engineering Lecture #11.
Simple UML 13 Nov 2018.
Shiyuan Jin Fall, 2003 September,16,2003
CSE470 Software Engineering UML Lecture.  UML resource page
Information System Design
UML  UML stands for Unified Modeling Language. It is a standard which is mainly used for creating object- oriented, meaningful documentation models for.
Presentation transcript:

COP4331UML Lecture Presented By: Antoniya Petkova 9/11/2009 Originally Prepared By: Pengju Shang for EEL5881 Software Engineering I

Slides material Slides material are taken from different sources including: UML resource page Google: UML Tutorial/Diagrams Object-Oriented Classical Software Engineering, seventh Edition, Stephen R. Schach the slides of Mr. Shiyuan Jin’s UML class, EEL 4884, Fall 2003 the slides of Mr. Yi Luo’s UML class, EEL 5881, Fall 2007.

Outline What is UML? Why Use UML? UML Diagrams Resources

What is UML? UML → “Unified Modeling Language”  Unified: UML has become a world standard  Modeling :Describing a software system at a high level of abstraction  Language: More comprehensible, ready- to-use, expressive, and visualing.

What is UML? Goals of UML:  Provide extensibility and specialization mechanisms to extend the core concepts  Be independent of particular programming languages and development processes  Provide a 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.

What is UML? History of UML  Object-Oriented modeling languages began to appear between mid-1970 and the late 1980s ;  Identified modeling languages: 50 ( )  Necessity and development

What is UML? 1997: UML 1.0, : UML 0.9 & : Unified Method 0.8 Other methods Booch ‘91 Booch ‘93 OMT - 2 OMT - 1 Year Version 2003: UML : UML : UML 1.3 began in late 1994(unifying the Booch and OMT (Object Modeling Technique) methods )

UML Diagrams Each UML diagram is designed to let developers and customers view a software system from a different perspective and in varying degrees of abstraction  Use Case Diagram  Class Diagram  Interaction Diagrams (Sequence Diagram / Collaboration Diagram )  State Diagram  Activity Diagram  …

Source:

Use-Case Diagrams Relationship between actors and use cases; capturing user requirements. Actors: An actor is represents a user or another system that will interact with the system you are modeling Use cases: an external view of the system that represents some actions the user might perform in order to complete a task

Use-Case Diagrams When to use:  Use cases are used in almost every project. How to Draw  Simplest

Use-Case Diagrams: Example A user placing an order with a sales company might follow these steps :  Browse catalog and select items.  Call sales representative.  Supply shipping information.  Supply payment information.  Receive conformation number from salesperson.

Use-Case Diagrams: Example The salesperson could also be included in this use case diagram because the salesperson is also interacting with the ordering system.

Use-Case Diagrams Relationships in Use Cases  Include: a use case includes the functionality described in another use case. ( directed arrow having a dotted shaft, labeled > ) >

Use-Case Diagrams Extend: the child use case, the parents use case. > The "Perform Pathological Tests" use case is a specialized version of the generic "Perform medical tests" use case.

Use-Case Diagrams Generalizations: The child use case in the generalization relationship has the underlying business process meaning, but is an enhancement of the parent use case. ( directed arrow with a triangle arrowhead ) you can replace any occurrence of the "Store patient records (paper file)" use case in the business flow of your system with the "Store patient records (computerized file)" use case without impacting any business flow.

Class diagram Class diagrams are widely used to describe the types of objects in a system and their relationships Each class is represented by a rectangle subdivided into three compartments  Name  Attributes  Operations

Class diagram Modifiers are used to indicate visibility of attributes and operations.  ‘ + ’ is used to denote Public visibility (everyone)  ‘ # ’ is used to denote Protected visibility (friends and derived)  ‘ - ’ is used to denote Private visibility (no one) - Customer_Name - Balance +addFunds( ) +withDraw( ) +transfer( ) Name Attributes Operations Account_Name

Class diagram There are two kinds of Relationships  Generalization (parent-child relationship)  Association (student enrolls in course) Associations can be further classified as  Aggregation  Composition

Generalization Subtype2 Supertype Subtype1 -Inheritance is a required feature of object orientation -Generalization expresses a parent/child relationship among related classes. -Used for abstracting details in several layers Regular Customer Loyalty Customer Example:

Association Associations represent static relationships between classes.  (association names  filled arrow )  (Place roles near the end of an association)

Association: Multiplicity and Roles UniversityPerson * * Multiplicity SymbolMeaning 1 One and only one 0..1Zero or one M..NFrom M to N (natural language) *From zero to any positive integer 0..*From zero to any positive integer 1..*From one to any positive integer teacher employer Role “A given university groups many people; some act as students, others as teachers. A given student belongs to a single university; a given teacher may or may not be working for the university at a particular time.” student

Association : Composition and Aggregation Association: Models the part–whole relationship  Composition : (filled diamond) “Every part may belong to only one whole, and If the whole is deleted, so are the parts”  Aggregation : (hollow diamond). “It is a specific kind of Container-Containee relationship”

Aggregation vs. Composition Composition is really a strong form of association  components have only one owner  components cannot exist independent of their owner  components live or die with their owner  e.g. Each car has an engine that can not be shared with other cars. Aggregations  may form "part of" the association, but may not be essential to it. They may also exist independent of the aggregate. e.g. Employees may exist independent of the team.

Association : Composition and Aggregation Composition : (filled diamond) Aggregation : (hollow diamond).

Interaction Diagrams Interaction diagrams are used when you want to model the behavior of several objects in a use case UML supports two types of interaction diagrams  Sequence diagrams Sequence diagrams generally show the sequence of events that occur  Collaboration diagrams Collaboration diagrams demonstrate how objects are statically connected.

Sequence Diagram:Object interaction Self-Call Self-Call: A message that an Object sends to itself. Condition: indicates when a message is sent. The message is sent only if the condition is true. Iteration Condition AB Synchronous Asynchronous Transmission delayed Self-Call [condition] remove() *[for each] remove()

Sequence Diagram(make a phone call) CallerPhoneRecipient Picks up Dial tone Dial Ring notificationRing Picks up Hello

Sequence Diagrams – Object Life Spans Creation  Create message  Object life starts at that point Activation  Symbolized by rectangular stripes  Place on the lifeline where object is activated.  Rectangle also denotes when object is deactivated. Deletion  Placing an ‘X’ on lifeline  Object’s life ends at that point Activation bar A B Create X Deletion Return Lifeline

Sequence Diagrams – Object Life Spans

Interaction Diagrams: Collaboration diagrams User Catalog Reservations start 1: look up 2: title data 3 : [not available] reserve title 4 : title returned 5 : hold title 6 : borrow title 6: remove reservation 5: title available  Collaboration diagrams are equivalent to sequence diagrams. All the features of sequence diagrams are equally applicable to collaboration diagrams  Use a sequence diagram when the transfer of information is the focus of attention  Use a collaboration diagram when concentrating on the classes

State Diagrams (Billing Example) State Diagrams show the sequences of states an object goes through during its life cycle in response to stimulin, together with its responses and actions; an abstraction of all possible behaviors. Unpaid Start End Paid Invoice createdpayingInvoice destroying

Yellow Red Green Traffic Light State Transition Event Start State Diagrams (Traffic light example)

Activity Diagrams Activity diagrams describe the workflow behavior of a system.  similar to state diagrams because activities are the state of doing something Activity diagrams can show activities that are conditional or parallel.

Activity Diagrams

Conclusion UML is a standardized specification language for object modeling Several UML diagrams:  Use-case diagram: a number of use cases (use case models the interaction between actors and software)  Class diagram: a model of classes showing the static relationships among them including association and generalization.  Sequence diagram: shows the way objects interact with one another as messages are passed between them. Dynamic model  State diagram: shows states, events that cause transitions between states. Another dynamic model reflecting the behavior of objects and how they react to specific event  Activity diagram: describes the state of activities by showing the sequence of activities performed.

UML Resources Books  Martin Fowler, Kendall Scott: UML Distilled, Addison-Wesley 2000  Grady Booch, et al: The Unified Modeling Language User Guide, Addison-Wesley  James Rumbaugh, et al: The Unified Modeling Language Reference Manual, Addison-Wesley Ivar Jacobson, et al: Unified Software Development Process, Addison-Wesley Online UML Resources  Rational Software – UML Resource Center ( UML Quick Reference ( UML Whitepapers ( Recommended Books ( UML Cafe ( Rational Software UML Resource Center UML Quick ReferenceUML WhitepapersRecommended BooksUML Cafe

UML Resources  The Object Management Group -- UML resource Page ( UML Tutorial ( The Object Management GroupUML resource PageUML Tutorial  The UML Center -- UML Information ( esources.htm#1) UML Events ( esources.htm#evnts) The UML CenterUML InformationUML Events  The UML Zone -- UML FAQ ( UML Q&A ( bin/dnewsweb.exe?utag=&group=vb.oop&xrelated=8577&cmd_r elated.x=69&cmd_related.y=6) The UML ZoneUML FAQ UML Q&A  GDpro -- UML Center( UML Dictionary( GDproUML CenterUML Dictionary