The Unified Modeling Language

Slides:



Advertisements
Similar presentations
UML an overview.
Advertisements

UML (Sequence Diagrams, Collaboration and State Chart Diagrams) Presentation By - SANDEEP REDDY CHEEDEPUDI (Student No: ) - VISHNU CHANDRADAS (Student.
© 2006 ITT Educational Services Inc. SE350 System Analysis for Software Engineers: Unit 9 Slide 1 Appendix 3 Object-Oriented Analysis and Design.
Introduction to UML. Acknowledgements Slides material are taken from different sources including: Slides material are taken from different sources including:
L4-1-S1 UML Overview © M.E. Fayad SJSU -- CmpE Software Architectures Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I.
© Copyright Eliyahu Brutman Programming Techniques Course.
Unified Modeling Language
Introduction to UML Prashanth Aedunuthula Fall, 2004.
Introduction to UML Shiyuan Jin Fall, 2006.
Chapter 7: The Object-Oriented Approach to Requirements
UML Diagrams Computer Science I.
UML Collaboration Diagram. Recap System Sequence Diagrams (SSD) UML for SSD Examples.
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.
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.
COP4331UML Lecture Presented By: Antoniya Petkova 9/11/2009 Originally Prepared By: Pengju Shang for EEL5881 Software Engineering I.
Unit 1 INTRODUCTION TO MODELING AND CLASS MODEL Ref : L7-UML.PDF.
Software Engineering Prof. Ing. Ivo Vondrak, CSc. Dept. of Computer Science Technical University of Ostrava
EEL5881 Software Engineering I UML Lecture Yi Luo.
UML diagrams What is UML UML diagrams –Static modeoing –Dynamic modeling 1.
Unified Modeling Language* Keng Siau University of Nebraska-Lincoln *Adapted from “Software Architecture and the UML” by Grady Booch.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
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.
L6-S1 UML Overview 2003 SJSU -- CmpE Advanced Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College.
7 Systems Analysis and Design in a Changing World, Fifth Edition.
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.
Use Case Diagram The purpose is to communicate the system’s functionality and behaviour to the customer or end user. Mainly used for capturing user requirements.
Design Jon Walker. More UML ● What is UML again?
SWT - Diagrammatics Lecture 4/4 - Diagramming in OO Software Development - partB 4-May-2000.
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.
Systems Analysis and Design in a Changing World, Fourth Edition
Lecture 9-1 : Intro. to UML (Unified Modeling Language)
1 Technical & Business Writing (ENG-715) Muhammad Bilal Bashir UIIT, Rawalpindi.
CS212: Object Oriented Analysis and Design Lecture 33: Class and Sequence Diagram.
Chapter 3: Introducing the UML
UML Course Instructor: Rizwana Noor. Overview  Modeling  What is UML?  Why UML?  UML Diagrams  Use Case  Components  Relationships  Notations.
Introduction to UML Created By: Ajay Bahoriya. Acknowledgements Slides material are taken from different sources including: Slides material are taken.
Unified Modeling Language. What is UML? Standard language for specifying, visualizing, constructing, and documenting the artifacts of software systems,
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.
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.
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.
 Class and Diagram  Representation of Class Name Attributes Operations  Visibility of Attributes and Operations.
Systems Analysis and Design in a Changing World, Fourth Edition
UML Diagrams By Daniel Damaris Novarianto S..
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.
Course Outcomes of Object Oriented Modeling Design (17630,C604)
Object-Oriented Analysis and Design
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
Introduction to UML Shiyuan Jin Spring, 2006.
UML Diagrams Jung Woo.
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
UML Unified Modelling Language
Business System Development
Introduction to UML Introduction to UML Shiyuan Jin September,23,2002
Sequence Diagrams.
Software models and the Unified Modeling Language (UML)
CIS 375 Bruce R. Maxim UM-Dearborn
Simple UML 13 Nov 2018.
Shiyuan Jin Fall, 2003 September,16,2003
Class Diagrams Class diagram is basically a graphical representation of the static view of the system and represents different aspects of the application.
CSE470 Software Engineering UML Lecture.  UML resource page
CIS 375 Bruce R. Maxim UM-Dearborn
Appendix 3 Object-Oriented Analysis and 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:

The Unified Modeling Language UML The Unified Modeling Language Introduce myself

Brief Summary of UML (The Unified Modeling Language) The UML is a language for visualizing specifying constructing Documenting It is used to understand, design, browse, configure, maintain, and control information about systems. The UML uses mostly graphical notations to express the OO analysis and design of software projects.  Simplifies the complex process of software design Acknowledgements for this presentation

Object Oriented Modeling Evolution of analysis and design techniques Transition from structured programming to object oriented programming

Goals of UML Provides a common language for describing both components and architectures Supports language-independent analysis and design Provides a common method for developing both information systems and technical applications Enables seamless transition from analysis to design to implementation Scales from small to large projects Facilitates iterative development Acknowledgements for this presentation

UML Assessment UML is messy, imprecise, complex. You don’t have to know or use every feature of UML any more than you need to know or use every feature of a large software application or programming language. UML can be and has been used in many different ways in real-world development projects. UML is more than a visual notation. UML models can be used to generate code and test cases. Acknowledgements for this presentation

Model: Models are the language of designer, in many disciplines Models are representations of the system to-be-built or as-built Models are vehicle for communications with various stakeholders Models allow reasoning about some characteristic of the real system Acknowledgements for this presentation

Types of UML Diagrams Use Case Diagram Class Diagram Sequence Diagram Collaboration Diagram State Diagram Activity Diagram Interaction Diagram Deployment Diagram Component Diagram This is only a subset of diagrams … but are most widely used

Use Case Diagram Used for describing a set of user scenarios Mainly used for capturing user requirements Work like a contract between end user and software developers

Use Case Diagram (core components) Actors: A role that a user plays with respect to the system,including human users and other systems. e.g.,inanimate physical objects (e.g. robot); an external system that needs some information from the current system. Use case: A set of scenarios that describing an interaction between a user and a system, including alternatives. System boundary: rectangle diagram representing the boundary between the actors and the system.

Use Case Diagram(core relationship) Association: communication between an actor and a use case; Represented by a solid line. Generalization: relationship between one general use case and a special use case (used for defining special alternatives) Represented by a line with a triangular arrow head toward the parent use case.

Use Case Diagram(core relationship) Include: a dotted line labeled <<include>> beginning at base use case and ending with an arrows pointing to the include use case. The insertion of additional behavior into a base use case that explicitly describes the insertion <<include>> Extend: a dotted line labeled <<extend>> with an arrow toward the base case. The insertion of additional behavior into a base use case that does not know about it. The base class declares “extension points”. <<extend>>

Use Case Diagrams Use Case Boundary Actor Library System Borrow Employee Client Order Title Fine Remittance Supervisor  A generalized description of how a system will be used.   Provides an overview of the intended functionality of the system

Use Case Diagrams(cont.) (TogetherSoft, Inc)

Use Case Diagrams(cont.) Pay Bill is a parent use case and Bill Insurance is the child use case. (generalization) Both Make Appointment and Request Medication include Check Patient Record as a subtask.(include) The extension point is written inside the base case Pay bill; the extending class Defer payment adds the behavior of this extension point. (extend)

Class diagram A class is a collection of objects with common structure, common behavior, common relationships and common semantics Classes are found by examining the objects in sequence and collaboration diagram A class is drawn as a rectangle with three compartments Classes should be named using the vocabulary of the domain Naming standards should be created e.g., all classes are singular nouns starting with a capital letter Detailed class diagrams are used for developers

Class representation Each class is represented by a rectangle subdivided into three compartments Name Attributes Operations 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) By default, attributes are hidden and operations are visible.

An example of Class Account_Name - Customer_Name - Balance +addFunds( ) #withDraw( ) +transfer( ) Name Attributes Operations

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

OO Relationships: Generalization Supertype Example: Customer Regular Customer Loyalty Customer Subtype1 Subtype2 or: Customer - Generalization expresses a parent/child relationship among related classes. - Used for abstracting details in several layers Regular Customer Loyalty Customer

OO Relationships: Association Represent relationship between instances of classes Student enrolls in a course Courses have students Courses have exams Etc. Association has two ends Role names (e.g. enrolls) Multiplicity (e.g. One course can have many students) Navigability (unidirectional, bidirectional)

Association: Multiplicity and Roles student 1 * University Person 0..1 * teacher employer Role Multiplicity Symbol Meaning 1 One and only one 0..1 Zero or one M..N From 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 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.”

Class Diagram * class * * * [from UML Distilled Third Edition] Name class Order Multiplicity: mandatory Attributes -dateReceived -isPrepaid * Customer 1 -number :String -name -price : Money -address Operations +dispatch() Association +creditRating() : String() +close() 1 {if Order.customer.creditRating is Generalization "poor", then Order.isPrepaid must be true } Corporate Customer Personal Customer Constraint (inside braces{}} -contactName -creditCard# -creditRating Multiplicity: Many value -creditLimit +remind() +billForMonth(Integer) Multiplicity: optional 0..1 * Employee * OrderLine -quantity: Integer * 1 Product -price: Money -isSatisfied: Boolean [from UML Distilled Third Edition]

Association: Model to Implementation * 4 Student Course has enrolls Class Student { Course enrolls[4]; } Class Course { Student have[];

OO Relationships: Composition Composition: expresses a relationship among instances of related classes. It is a specific kind of Whole-Part relationship. Whole Class Class W Class P1 Class P2 Part Classes Example Automobile Engine Transmission

OO Relationships: Aggregation Container Class Class C Aggregation: expresses a relationship among instances of related classes. It is a specific kind of Container-Containee relationship. AGGREGATION Class E1 Class E2 Containee Classes Example Bag Apples Milk

Aggregation vs. Composition Composition is really a strong form of aggregation 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 aggregate, but may not be essential to it. They may also exist independent of the aggregate. e.g. Apples may exist independent of the bag.

Sequence Diagram(make a phone call) Caller Phone Recipient Picks up Dial tone Dial Ring notification Ring Picks up Hello

Sequence Diagram:Object interaction A sequence diagram displays an interaction as a two-dimensional chart. The vertical dimension is the time axis; time proceeds down the page. The horizontal dimension shows the roles that represent individual objects in the collaboration. Each role is represented by a vertical column containing a head symbol and a vertical line—a lifeline. A B Synchronous Asynchronous 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. Condition [condition] remove() Iteration *[for each] remove() Self-Call

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 A B Create X Deletion Return Lifeline Activation bar

Sequence Diagram Message Sequence diagrams demonstrate the behavior of objects in a use case by describing the objects and the messages they pass. The horizontal dimension shows the objects participating in the interaction. The vertical arrangement of messages indicates their order. The labels may contain the seq. # to indicate concurrency.

Interaction Diagrams: Collaboration diagrams start 6: remove reservation 3 : [not available] reserve title User Reservations 5: title available 6 : borrow title 1: look up 2: title data 4 : title returned Catalog 5 : hold title Shows the relationship between objects and the order of messages passed between them.  between them. The objects are listed as rectangles and arrows indicate the messages being passed The numbers next to the messages are called sequence numbers. They show the sequence of the messages as they are passed between the objects.  convey the same information as sequence diagrams, but focus on object roles instead of the time sequence.

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

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

Activity Diagram Acknowledgements for this presentation

Activity Diagram Built during analysis and design Purpose Model business workflows Model operations Developed by analysts, designers and implementers Acknowledgements for this presentation

The Physical Model The component diagram shows the relationship between software components, their dependencies, communication, location and other conditions. A deployment diagram illustrates the physical deployment of the system into a production (or test) environment. It shows where components will be located, on what servers, machines or hardware. It may illustrate network links, LAN bandwidth & etc. Acknowledgements for this presentation

The Physical Model This diagram shows the relationships among software and hardware components involved in real estate transactions. Acknowledgements for this presentation

Component Diagram Captures the physical structure of the implementation Built as part of architectural specification Purpose Organize source code Construct an executable release Specify a physical database Developed by architects and programmers Acknowledgements for this presentation

Deployment Diagram Captures the topology of a system’s hardware Built as part of architectural specification Purpose Specify the distribution of components Identify performance bottlenecks Developed by architects, networking engineers, and system engineers Acknowledgements for this presentation

Architecture and the UML Organization Package, subsystem Dynamics Interaction, State machine Components Classes, interfaces, collaborations Design View Implementation View Use Case View Use cases Activity, Active classes Nodes Process View Deployment View Acknowledgements for this presentation

Acknowledgements for this presentation