Introduction to Unified Modeling Language (UML)

Slides:



Advertisements
Similar presentations
A Brief Introduction. Acknowledgements  The material in this tutorial is based in part on: Concurrency: State Models & Java Programming, by Jeff Magee.
Advertisements

2008/03/25 Unified Modeling Lanauage 1 Introduction to Unified Modeling Language (UML) – Part One Ku-Yaw Chang Assistant Professor.
UML: Unified Modeling Language
The Unified Software Development Process - Workflows Ivar Jacobson, Grady Booch, James Rumbaugh Addison Wesley, 1999.
Kari R. Schougaard, PhD Stud. Værktøjer og Teknikker, 2006 UNIVERSITY OF AARHUS Department of Computer Science Unified Modeling Language Visual language.
Unified Modeling Language
CSCI-383 Object-Oriented Programming & Design Lecture 9.
CIT UPES | Sept 2013 | Unified Modeling Language - UML.
Introduction to UML By: Prof. Aiman Hanna Department of Computer Science, Concordia University, Montreal, Canada.
Unified Modeling Language, Version 2.0
1 Responsibility Driven Design Responsibility Driven Design, Rebecca Wirfs Brock, 1990 The Coffee Machine Design Problem, Alistair Cockburn, C/C++ User's.
Object-Oriented Analysis and Design An Introduction.
Programming in Java Unit 3. Learning outcome:  LO2:Be able to design Java solutions  LO3:Be able to implement Java solutions Assessment criteria: 
Software development process ธนวัฒน์ แซ่ เอียบ. The development process Process –set of rules which define how a development project. Methodology and.
CSC 395 – Software Engineering Lecture 13: Object-Oriented Analysis –or– Let the Pain Begin (At Least I’m Honest!)
Lab 04.
16 August, 2007Information System Design IT60105, Autumn 2007 Information System Design IT60105 Lecture 7 Unified Modeling Language.
Introduction to Unified Modeling Language (UML) By Mercer & Milanova, updated by Professor Spiegel, with help from The Unified Modeling Language User Guide,
Introduction to Unified Modeling Language (UML) By Rick Mercer with help from The Unified Modeling Language User Guide, Grady Booch, James Rumbaugh, Ivar.
An Introduction to the Unified Modeling Language
1 Introduction to UML. 2 What is UML? UML is an acronym for Unified Modeling Language. Unified –Combines the best from existing object- oriented software.
 What is Modeling What is Modeling  Why do we Model Why do we Model  Models in OMT Models in OMT  Principles of Modeling Principles of Modeling 
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.
UML as a Specification Language for Embedded Systems. By, Mir Ahmed Ali, Asst. Professor, ECM department, SNIST. By, Prof. Narsiah sir, Director of School.
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 2008, Alverson Using UML to express Software Architecture.
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.
The Unified Modeling Language (UML)
ITEC324 Principle of CS III Chapter 2 (Horstmann’s Book) – Part 1 The Object-Oriented Design Process Hwajung Lee.
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.
1 Unified Modeling Language, Version 2.0 Chapter 2.
Chapter 3: Introducing the UML
UML Course Instructor: Rizwana Noor. Overview  Modeling  What is UML?  Why UML?  UML Diagrams  Use Case  Components  Relationships  Notations.
Object Oriented Programming and Data Abstraction Earl Huff Rowan University.
Basic Characteristics of Object-Oriented Systems
Object Oriented Analysis & Design By Rashid Mahmood.
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.
Chapter 2 (Horstmann’s Book) – Part 1 The Object-Oriented Design Process Hwajung Lee.
Introduction to Unified Modeling Language (UML) By Rick Mercer with help from The Unified Modeling Language User Guide, Grady Booch, James Rumbaugh, Ivar.
SWE 214 (071) Introduction to UML Slide 1 Introduction to UML.
Slide 1 Unified Modeling Language, Version 2.0 Object-Oriented SAD.
Modeling with UML – Class Diagrams
Introduction to UML.
Unified Modeling Language
Evolution of UML.
Course Outcomes of Object Oriented Modeling Design (17630,C604)
Object-Oriented Modeling with UML
Systems Analysis and Design With UML 2
Use Case Model.
Unified Modeling Language
Dynamic Modeling of Banking System Case Study - II
Introduction to Unified Modeling Language (UML)
Systems Analysis and Design With UML 2
James Miller, Julia John
University of Central Florida COP 3330 Object Oriented Programming
Software Architecture & Design Pattern
A tool for presentation of Architecture
A tool for presentation of Architecture
Introduction to Unified Modeling Language (UML)
Introduction to UML Introduction to UML Shiyuan Jin September,23,2002
The Unified Modeling Language
Introduction to Unified Modeling Language (UML)
Introduction to UML.
Software Engineering System Modeling Chapter 5 (Part 1) Dr.Doaa Sami
Software Design Methodologies and Testing
ITEC324 Principle of CS III
UML  UML stands for Unified Modeling Language. It is a standard which is mainly used for creating object- oriented, meaningful documentation models for.
ITEC324 Principle of CS III
Presentation transcript:

Introduction to Unified Modeling Language (UML) By Rick Mercer with help from The Unified Modeling Language User Guide, Grady Booch, James Rumbaugh, Ivar Jacobsen , Addison Wesley, 1999, ISBN 0-201-57168-4 1

The Unified Modeling Language (UML) UML or Unified Modeling Language comes from Rumbaugh, Booch, and Jacobson (the three amigos) who combined efforts to standardize on one modeling language This is primarily a graphical communication mechanism for developers and customers We will learn some, but not all, of the UML it is very complex, few understand all of it 2

UML The main purpose of UML is to support communication about the analysis and design of the system being developed support the movement from the problem domain in the "world" to the solution domain in the machine Two views of the same system one view has diagrams source code is another view Sometimes it's nice to look at the overview Reverse engineer your code with a UML tool to see how your code looks in UML 3

UML is a Modeling Language graphical notation to describe software design has rules on how to draw models of classes associations between classes message sends between objects has become the de facto industry standard Not official, but everyone uses it like a blueprint to show what is going on during analysis, design and implementation Some Projects require UML documentation 4

UML Defined by the Authors The Unified Modeling Language User Guide, Booch, Rumbaugh, Jacobson states: The UML is a language for visualizing specifying constructing documenting the artifacts of a software intensive system 5

First up: Class Diagrams A class diagram expresses class definitions to be implemented lists name, attributes, and methods for each class shows relationships between classes UML allows different levels of detail on both the attributes and the methods of one class could be just the the class name in a rectangle or like the general form shown on the next slide 6

Software Specification (Class Name) attribute attribute : type attribute : type = initial value classAttribute derivedAttribute ... method1() method2(parameter : Type) : return type abstractMethod() +publicMethod() -privateMethod() #protectedMethod() classMethod() ... 7

- allAccounts : HashMap AccountCollection - allAccounts : HashMap +AccountCollection () +getAccountWithID (ID: String) : Account +add(accountToAdd: Account) : boolean +iterator() : Iterator Note: iterator is needed by the bank manager 8

<<interface>> Sterotypes Stereotype is a UML element that allows designers to extend the UML vocabulary Often used to distinguish an abstract class name from an interface, both of which are written in italic <<interface>> Iterator +hasNext(): boolean +next(): Object +remove(): void 9

Different levels of detail Tips for modeling Express as much or as little detail as needed Often, a rectangle with a name is enough perhaps a method or an attribute clarifies Simple is good Sketches on paper or white board are effective 10

Relationships Three Relationships in UML 1) Dependency 2) Association 3) Generalization 11

1) Dependency: A Uses Relationship Dependencies occurs when one object depends on another if you change one object's interface, you need to change the dependent object arrows point from dependent to needed objects CardReader Jukebox CDCollection SongSelector 12

2)Association: Structural Relationship a relationship between classes indicates some meaningful or interesting connection Associations can be labeled getAccountWithID for example BTW: The box with association is an official UML comment, must have that fold  association getAccountWithID Jukebox JukeboxAccountCollection 1 1 13

Associations Associations imply our knowledge that a relationship must be preserved for some time (0.01 ms to forever) Between what objects do we need to remember a relationship? Does a Transaction need to remember Account? Would AccountCollection need to remember Accounts? Stores AccountCollection Account 1 0..* 14

Notation and Multiplicity Adornments UML Association: a line between two concepts and a name they are bi-directional can have a multiplicity exist in class diagrams * zero or more; T "many" 1.. * T one or more 1..52 T one to fifty two Multiplicity adornments 5 T exactly five 15

Aggregation: A Special Association Aggregation: whole/part relationships An association that models HAS-A relationships The objects can exist independently of each other No one object is more important than the other Place an open diamond on the whole School contains a collection of Student objects In Java, this is the same as an association, an instance variable, no special syntax School Student 1..* * 16

Sequence Diagrams Interaction diagrams describe how groups of objects collaborate in some behavior The UML defines several forms of interaction diagram, the most common is the sequence diagram A class diagram shows a fixed view of a system A sequence diagram represents a dynamic view of a system by capturing message sends over time Can document a scenario such as Dealer deals cards to all players Withdraw Money when there is enough balance Withdraw Money when there is not enough balance 17

18

Sequence Diagrams Not good at showing details of algorithms such as loops and conditional Good at showing the calls between participants Gives a good picture about which participants are doing which processing 19

More Distributed Control Shown here 20

Syntax Objects are lined up on top in rectangles Object names :CardReader Dashed lines represent lifetime of objects Rectangles are activation lines When the object is "alive" Activation bar of the receivers of the message is smaller than the sender's activation bar Not much detail written 21

Another Example http://www. ifi. uio Scenario: The user tries to use an ATM, but the account is not known 22

Scenario: The user successfully withdraws money from an ATM http://www.visual-paradigm.com/ VPGallery/diagrams/Sequence.html Scenario: The user successfully withdraws money from an ATM 23