SlideShare uma empresa Scribd logo
1 de 47
Baixar para ler offline
ObjectObject--Oriented Software EngineeringOriented Software Engineering
Chapter 2
Unified Modeling
Language
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
Introduction
•A model is an abstract representation
of a system, constructed to
understand the system prior to
building or modifying it.
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
building or modifying it.
•Most of the modeling techniques
involve graphical languages.
Why Modeling?
• Models make it easier to express complex
ideas. For example, an architect
builds a model to communicate ideas
more easily to clients.
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
• Models reduce complexity by separating
those aspects that are unimportant from
those that are important.
Advantages of Modeling (Con’t)
•Models enhance learning.
•The cost of the modeling analysis is
much lower than the cost of similar
experimentation conducted with a
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
experimentation conducted with a
real system.
•Manipulation of the model
(changing variables) is much easier
than manipulating a real system.
Modeling Key Ideas
•A model is rarely correct on
the first try.
•Always seek the advice and
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
•Always seek the advice and
criticism of others.
• Avoid excess model revisions, as they
can distort the essence of your model.
Let simplicity and elegance guide you
through the process.
The Unified Modeling Language
(UML)
• The unified modeling language (UML) is a
language for specifying, constructing,
visualizing, and documenting the software
system and its components.
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
A complete language for capturing
knowledge (semantics) about a
subject (system) and
communicating the knowledge
(syntax)
Primary goals in the design of the UML
• Provide users a ready-to-use, expressive visual
modeling language to develop and exchange
meaningful models.
• Provide extensibility and specialization
mechanisms to extend the core concepts.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
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
History and Background
8
History of the UMLHistory of the UML
Nov ‘97 UML approved by the OMG
Creating UML
Static Views are modeled using
 Use Case Diagrams
 Class Diagrams
 Object Diagrams
 Component Diagrams
 Deployment Diagrams
What can you model with UML?
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
 Deployment Diagrams
Dynamic Views are modeled using
Sequence Diagrams
Collaboration Diagrams
Activity Diagrams
State-chart Diagrams
Static Model
•A static model can be viewed as a
"snapshot" of a system's
parameters at rest or at a specific
point in time.
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
point in time.
•The classes’ structure
and their relationships
to each other frozen
in time are examples of
static models.
Dynamic Model
•Is a collection of procedures or
behaviors that, taken together,
reflect the behavior of a system
over time.
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
over time.
•For example, an order interacts
with inventory to determine
product availability.
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
Building Blocks of UML
To understand the UML, you need to form a
conceptual model of the language, and this
requires learning three basic building blocks:
1. Elements: Main “citizens” of the model
2. Relationships: tie elements together
3. Diagrams: mechanisms to group
interesting collections of elements and
relationships
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
Elements in
UML
Structural
Elements
1.Classes
Behavioral
Elements
1. Interactions
Grouping
Elements
Annotation
Elements
1.Classes
2. Interfaces
3. Collaborations
4. Use cases
5. Active classes
6. Components
7. Node classes
1. Interactions
2. State Charts 1. Package 1. Note
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
Structural Elements
1.1. ClassClass::
 It is a description of a set of objects
that share the same attributes,
Static part of the model to represent conceptual or physical
elements
 “nouns” of the model
that share the same attributes,
operations, relationships, and
semantics.
 implements one or more interfaces.
 Graphically, a class is rendered as a
rectangle, usually including its name,
attributes, and operations
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
Structural Elements
22.. InterfaceInterface::
• is a collection of operations that
specify a service of a class or
component.
• An interface might represent the
complete behavior of a class or
component or only a part of that
behavior
• An interface rarely stands alone.
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
Agency
Structural Elements
33.. ColloborationColloboration::
• Defines an interaction between
elements
• Several elements cooperating to
deliver a behavior rather than
individual behavior
Capture
online
individual behavior
• Includes structural and behavioral
dimensions
• Represents implementations of
patterns that make up a system
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
Structural Elements
44.. UseUse CasesCases::
• Description of a sequence of
actions that a system performs to
deliver an observable result to a
particular actor
• Used to structure the behavioral• Used to structure the behavioral
elements in a model
• Realized by collaboration
• Graphically rendered as an
ellipse drawn with a solid line
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
Structural Elements
55.. ActiveActive ClassesClasses::
• A class whose objects own one or
more processes or threads and
therefore can initiate an action
• A class whose objects have
concurrent behavior with otherconcurrent behavior with other
objects
• Graphically, an active class is
rendered just like a class drawn
with a thick line
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
Structural Elements
6.6. ComponentComponent
• is a physical and replaceable part
of a system that conforms to and
provides the realization of a set of
interfaces.interfaces.
• Graphically, a component is
rendered as a rectangle with tabs
• it also can be used to represent
applications, files, libraries,pages
and tables.
•
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
Structural Elements
77.. NodeNode ClassClass::
• is a physical element that exists at run
time
• represents a computational resource,
generally having at least some memory
and, often, processing capability.and, often, processing capability.
• a set of components may reside in a node
• components may also migrate from one
node to another
• Graphically, a node is rendered as a cube,
usually including only its name
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
Behavioral Elements
11.. InteractionInteraction::
• a set of messages exchanged among a set of objects
within a particular context to accomplish a specific
These are the dynamic parts of UML models.
Represent behavior over time and space
“verbs” of the model
Save application()
within a particular context to accomplish a specific
purpose
• specifies the behavior of a set of objects
• involves a number of other elements:
– messages, action sequences (behavior invoked by
a message) and links (connection between objects)
• graphically rendered as an arrow
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
Behavioral Elements
22.. StateState MachineMachine::
• specifies a sequence of states an object or an
interaction goes through during its lifetime and its
response to external events
• may specify the behavior of an individual class or a
collaboration of classescollaboration of classes
• includes a number of elements including states,
transition, events and activities
• presented as a rounded rectangle with a name and sub-
• states
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
Grouping Element
1.1. PackagePackage::
• mechanism for organizing elements
into groups.
Are the organizational parts of UML models. These are the boxes
into which a model can be decomposed .There is one primary
kind of grouping thing, namely, packages.
into groups.
• All elements can be placed in a package.
• Graphically, a package is rendered as a
tabbed folder, usually including only its
name and, sometimes, its contents
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
Annotational Element
1.1. NoteNote::
• comments added to models for better
explanation or illumination on specific elements
are the explanatory parts of UML models. These are the
comments you may apply to describe about any element in a
model.
explanation or illumination on specific elements
• explanatory aspect of UML models
• notes are used primarily for annotation e.g. for
rendering constraints and comments attached to
elements or collections of elements
• presented as a rectangle with a dog-eared corner
• may include both textual and graphical comments
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
Relationships in the UML
1.1. DependencyDependency::
There are four kinds of relationships in the UML:
1. Dependency
2. Association
3. Generalization
4. Realization
1.1. DependencyDependency::
• A semantic relationship between two
elements in which a change to one
element (independent element) may
affect the meaning of the other
(dependent element)
• Given as a directed dashed line possibly
with a label
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
Relationships in the UML
22.. AssociationAssociation::
• a structural relationship describing a set of links
• links are connections between objects
• aggregation is a special type of association depicting
whole-part relationshipwhole-part relationship
• association is presented as a solid line, possibly
directed, labeled and with adornments (multiplicity
and role)
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
Relationships in the UML
33.. GeneralizationGeneralization
• a relationship in which objects of a
specialized element (child) are
substitutable for objects of a
generalized element (parent)
• child elements share the structure• child elements share the structure
and behavior of the parent
• rendered graphically as a solid line
with hollow arrow head pointing to
the parent
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
Relationships in the UML
44.. RealizationRealization::
• a semantic relationship between
elements, wherein one element specifies
a contract and another guarantees to
carry out this contract
• relevant in two basic scenarios:• relevant in two basic scenarios:
– interfaces versus realizing classes or
components
– uses cases versus realizing collaborations
• graphically depicted as a dashed arrow
with hollow head a cross between
dependency and generalization
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
Diagrams in UML
• a graph presentation of a set of elements and
relationships where:
– nodes are elements
– edges are relationships
• UML includes nine such diagrams
1. Class Diagram
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
Diagrams in UML
1. Class Diagram:
o Static structure of a
system
o Show a set of classes,
interfaces, collaboration,
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
interfaces, collaboration,
and their relationships
o address static design
view of a system
Diagrams in UML
2. Object Diagram:
Static structure of a system at a particular time
Show a set of objects and their relationships
static snapshots of element instances found in class
diagrams
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
Diagrams in UML
3. Use Case Diagram:
Functionality of a system
Show a set of actors and use cases, and their relationships
addresses static use case view of the system
important for organizing and modeling the external
behavior of the system
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
behavior of the system
Diagrams in UML
4. Sequence Diagram:
Interaction among elements of a system in a
time sequence
 show interactions consisting of a set of
objects and the messages sent and received by
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
objects and the messages sent and received by
those objects
address the dynamic behavior of a system
with special emphasis on the chronological
ordering of messages
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
Diagrams in UML
5.Collaboration Diagram:
Interaction among elements and their relations
organized in time and space
Show the structural organization of objects
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
Show the structural organization of objects
that send and receive messages
Sequence and collaboration diagram are
isomorphic i.e. one can be transformed into
another
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
Diagrams in UML
6. State Chart Diagram:
The status condition and responses of the elements of
a system
Show a state machine consisting of states, transitions,
events, and activities
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
events, and activities
 address the dynamic view of a system
 important in modeling the behavior of an interface,
class or collaboration
 emphasize on event-driven ordering
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
Diagrams in UML
7. Activity Diagram:
The activities of the system
 a diagram showing control/data flows from one
activity to another
 addresses the dynamic view of a system, useful for
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
 addresses the dynamic view of a system, useful for
modeling its functions
 emphasizes the flow of control among objects
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
Diagrams in UML
8.Component Diagram:
The organization of the elements realizing the system
Show the organization and dependencies amongst a
set of components
 address static implementation view of a system
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
 address static implementation view of a system
 a component typically maps to one or more classes,
interfaces or collaborations
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
Diagrams in UML
9.Deployment Diagram:
Configuration of environment elements and the
mapping of elements realizing the system into them
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill

Mais conteúdo relacionado

Mais procurados

Unit 4 designing classes
Unit 4  designing classesUnit 4  designing classes
Unit 4 designing classes
gopal10scs185
 
Function oriented design
Function oriented designFunction oriented design
Function oriented design
Vidhun T
 
Software Engineering course
Software Engineering courseSoftware Engineering course
Software Engineering course
Jeremy Rose
 
Object oriented analysis
Object oriented analysisObject oriented analysis
Object oriented analysis
Mahesh Bhalerao
 

Mais procurados (20)

Session 1: Overview of OOAD and UML 2.x
Session 1: Overview of OOAD and UML 2.xSession 1: Overview of OOAD and UML 2.x
Session 1: Overview of OOAD and UML 2.x
 
OOAD chapter 1
OOAD chapter 1 OOAD chapter 1
OOAD chapter 1
 
analysis and design with uml
analysis and design with umlanalysis and design with uml
analysis and design with uml
 
Modeling software architecture with uml
Modeling software architecture with umlModeling software architecture with uml
Modeling software architecture with uml
 
Unit 4 designing classes
Unit 4  designing classesUnit 4  designing classes
Unit 4 designing classes
 
Round - Trip Software Engineering using UML: From Architecture to Design and...
Round - Trip Software Engineering using UML:  From Architecture to Design and...Round - Trip Software Engineering using UML:  From Architecture to Design and...
Round - Trip Software Engineering using UML: From Architecture to Design and...
 
CS8592-OOAD Lecture Notes Unit-2
CS8592-OOAD Lecture Notes Unit-2CS8592-OOAD Lecture Notes Unit-2
CS8592-OOAD Lecture Notes Unit-2
 
Coupling coheshion tps
Coupling coheshion tpsCoupling coheshion tps
Coupling coheshion tps
 
UML
UMLUML
UML
 
Function oriented design
Function oriented designFunction oriented design
Function oriented design
 
Complexity
ComplexityComplexity
Complexity
 
OOAD - Systems and Object Orientation Concepts
OOAD - Systems and Object Orientation ConceptsOOAD - Systems and Object Orientation Concepts
OOAD - Systems and Object Orientation Concepts
 
Object oriented analysis and design unit- iv
Object oriented analysis and design unit- ivObject oriented analysis and design unit- iv
Object oriented analysis and design unit- iv
 
Software Engineering course
Software Engineering courseSoftware Engineering course
Software Engineering course
 
Unified Modeling Language
Unified Modeling LanguageUnified Modeling Language
Unified Modeling Language
 
CS8592-OOAD Question Bank
CS8592-OOAD  Question BankCS8592-OOAD  Question Bank
CS8592-OOAD Question Bank
 
Object oriented analysis
Object oriented analysisObject oriented analysis
Object oriented analysis
 
RRC AD
RRC ADRRC AD
RRC AD
 
Object-Oriented Analysis and Design
Object-Oriented Analysis and DesignObject-Oriented Analysis and Design
Object-Oriented Analysis and Design
 
CS8592-OOAD Lecture Notes Unit-1
CS8592-OOAD Lecture Notes Unit-1CS8592-OOAD Lecture Notes Unit-1
CS8592-OOAD Lecture Notes Unit-1
 

Destaque (16)

Thank You...
Thank You...Thank You...
Thank You...
 
4. oose analysis
4. oose analysis4. oose analysis
4. oose analysis
 
Uml examples
Uml examplesUml examples
Uml examples
 
2.1 usecase diagram
2.1 usecase diagram2.1 usecase diagram
2.1 usecase diagram
 
Cv2015 atsushi teshima
Cv2015 atsushi teshimaCv2015 atsushi teshima
Cv2015 atsushi teshima
 
5. oose design new copy
5. oose design new   copy5. oose design new   copy
5. oose design new copy
 
Uml tutorial
Uml tutorialUml tutorial
Uml tutorial
 
Ooad
OoadOoad
Ooad
 
Recognitions_Career
Recognitions_CareerRecognitions_Career
Recognitions_Career
 
Ooad 2
Ooad 2Ooad 2
Ooad 2
 
3. 2 req elicitation activities
3. 2  req elicitation activities3. 2  req elicitation activities
3. 2 req elicitation activities
 
3. 1 req elicitation
3. 1 req elicitation3. 1 req elicitation
3. 1 req elicitation
 
Cv2016 TESHIMA ATSUSHI
Cv2016 TESHIMA ATSUSHICv2016 TESHIMA ATSUSHI
Cv2016 TESHIMA ATSUSHI
 
1. oose
1. oose1. oose
1. oose
 
Recognitions_Career
Recognitions_CareerRecognitions_Career
Recognitions_Career
 
6. oose testing
6. oose testing6. oose testing
6. oose testing
 

Semelhante a 2 uml

Object-Oriented Systems Analysis and Design Using UML.pptx
Object-Oriented Systems Analysis and Design Using UML.pptxObject-Oriented Systems Analysis and Design Using UML.pptx
Object-Oriented Systems Analysis and Design Using UML.pptx
XanGwaps
 
Module3 - Object Oriented Analysis & Functional Model.pdf
Module3 - Object Oriented Analysis & Functional Model.pdfModule3 - Object Oriented Analysis & Functional Model.pdf
Module3 - Object Oriented Analysis & Functional Model.pdf
Gerard Alba
 
Object-Oriented Systems Analysis and Design Using UML.pptx
Object-Oriented Systems Analysis and Design Using UML.pptxObject-Oriented Systems Analysis and Design Using UML.pptx
Object-Oriented Systems Analysis and Design Using UML.pptx
XanGwaps
 
Cse 6007 fall2012
Cse 6007 fall2012Cse 6007 fall2012
Cse 6007 fall2012
rhrashel
 

Semelhante a 2 uml (20)

oomd-unit-i-cgpa.ppt
oomd-unit-i-cgpa.pptoomd-unit-i-cgpa.ppt
oomd-unit-i-cgpa.ppt
 
UML diagrams and symbols
UML diagrams and symbolsUML diagrams and symbols
UML diagrams and symbols
 
Unit 2
Unit 2Unit 2
Unit 2
 
Object-Oriented Systems Analysis and Design Using UML.pptx
Object-Oriented Systems Analysis and Design Using UML.pptxObject-Oriented Systems Analysis and Design Using UML.pptx
Object-Oriented Systems Analysis and Design Using UML.pptx
 
Intoduction to uml
Intoduction to umlIntoduction to uml
Intoduction to uml
 
Ooad lab manual
Ooad  lab manualOoad  lab manual
Ooad lab manual
 
Module3 - Object Oriented Analysis & Functional Model.pdf
Module3 - Object Oriented Analysis & Functional Model.pdfModule3 - Object Oriented Analysis & Functional Model.pdf
Module3 - Object Oriented Analysis & Functional Model.pdf
 
Dynamic modeling
Dynamic modelingDynamic modeling
Dynamic modeling
 
OOM Unit I - III.pdf
OOM Unit I - III.pdfOOM Unit I - III.pdf
OOM Unit I - III.pdf
 
Assignment 1 SYD601 2012 rick_danby completed with audio
Assignment 1 SYD601 2012 rick_danby completed with audioAssignment 1 SYD601 2012 rick_danby completed with audio
Assignment 1 SYD601 2012 rick_danby completed with audio
 
Chapter 4_Introduction to Patterns.ppt
Chapter 4_Introduction to Patterns.pptChapter 4_Introduction to Patterns.ppt
Chapter 4_Introduction to Patterns.ppt
 
Chapter 4_Introduction to Patterns.ppt
Chapter 4_Introduction to Patterns.pptChapter 4_Introduction to Patterns.ppt
Chapter 4_Introduction to Patterns.ppt
 
UML-Advanced Software Engineering
UML-Advanced Software EngineeringUML-Advanced Software Engineering
UML-Advanced Software Engineering
 
Object-Oriented Systems Analysis and Design Using UML.pptx
Object-Oriented Systems Analysis and Design Using UML.pptxObject-Oriented Systems Analysis and Design Using UML.pptx
Object-Oriented Systems Analysis and Design Using UML.pptx
 
Analysis
AnalysisAnalysis
Analysis
 
Unit-II(STATIC UML DIAGRAMS).ppt
Unit-II(STATIC UML DIAGRAMS).pptUnit-II(STATIC UML DIAGRAMS).ppt
Unit-II(STATIC UML DIAGRAMS).ppt
 
[RPL2] Pertemuan 3 - UML dan USECASE VIEW
[RPL2] Pertemuan 3 - UML dan USECASE VIEW[RPL2] Pertemuan 3 - UML dan USECASE VIEW
[RPL2] Pertemuan 3 - UML dan USECASE VIEW
 
OOSD_UNIT1 (1).pptx
OOSD_UNIT1 (1).pptxOOSD_UNIT1 (1).pptx
OOSD_UNIT1 (1).pptx
 
Oomd unit1
Oomd unit1Oomd unit1
Oomd unit1
 
Cse 6007 fall2012
Cse 6007 fall2012Cse 6007 fall2012
Cse 6007 fall2012
 

2 uml

  • 1. ObjectObject--Oriented Software EngineeringOriented Software Engineering Chapter 2 Unified Modeling Language Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
  • 2. Introduction •A model is an abstract representation of a system, constructed to understand the system prior to building or modifying it. Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill building or modifying it. •Most of the modeling techniques involve graphical languages.
  • 3. Why Modeling? • Models make it easier to express complex ideas. For example, an architect builds a model to communicate ideas more easily to clients. Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill • Models reduce complexity by separating those aspects that are unimportant from those that are important.
  • 4. Advantages of Modeling (Con’t) •Models enhance learning. •The cost of the modeling analysis is much lower than the cost of similar experimentation conducted with a Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill experimentation conducted with a real system. •Manipulation of the model (changing variables) is much easier than manipulating a real system.
  • 5. Modeling Key Ideas •A model is rarely correct on the first try. •Always seek the advice and Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill •Always seek the advice and criticism of others. • Avoid excess model revisions, as they can distort the essence of your model. Let simplicity and elegance guide you through the process.
  • 6. The Unified Modeling Language (UML) • The unified modeling language (UML) is a language for specifying, constructing, visualizing, and documenting the software system and its components. Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill A complete language for capturing knowledge (semantics) about a subject (system) and communicating the knowledge (syntax)
  • 7. Primary goals in the design of the UML • Provide users a ready-to-use, expressive visual modeling language to develop and exchange meaningful models. • Provide extensibility and specialization mechanisms to extend the core concepts.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 Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
  • 9. History of the UMLHistory of the UML Nov ‘97 UML approved by the OMG
  • 11. Static Views are modeled using  Use Case Diagrams  Class Diagrams  Object Diagrams  Component Diagrams  Deployment Diagrams What can you model with UML? Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill  Deployment Diagrams Dynamic Views are modeled using Sequence Diagrams Collaboration Diagrams Activity Diagrams State-chart Diagrams
  • 12. Static Model •A static model can be viewed as a "snapshot" of a system's parameters at rest or at a specific point in time. Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill point in time. •The classes’ structure and their relationships to each other frozen in time are examples of static models.
  • 13. Dynamic Model •Is a collection of procedures or behaviors that, taken together, reflect the behavior of a system over time. Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill over time. •For example, an order interacts with inventory to determine product availability.
  • 14. Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
  • 15. Building Blocks of UML To understand the UML, you need to form a conceptual model of the language, and this requires learning three basic building blocks: 1. Elements: Main “citizens” of the model 2. Relationships: tie elements together 3. Diagrams: mechanisms to group interesting collections of elements and relationships Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
  • 16. Elements in UML Structural Elements 1.Classes Behavioral Elements 1. Interactions Grouping Elements Annotation Elements 1.Classes 2. Interfaces 3. Collaborations 4. Use cases 5. Active classes 6. Components 7. Node classes 1. Interactions 2. State Charts 1. Package 1. Note Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
  • 17. Structural Elements 1.1. ClassClass::  It is a description of a set of objects that share the same attributes, Static part of the model to represent conceptual or physical elements  “nouns” of the model that share the same attributes, operations, relationships, and semantics.  implements one or more interfaces.  Graphically, a class is rendered as a rectangle, usually including its name, attributes, and operations Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
  • 18. Structural Elements 22.. InterfaceInterface:: • is a collection of operations that specify a service of a class or component. • An interface might represent the complete behavior of a class or component or only a part of that behavior • An interface rarely stands alone. Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill Agency
  • 19. Structural Elements 33.. ColloborationColloboration:: • Defines an interaction between elements • Several elements cooperating to deliver a behavior rather than individual behavior Capture online individual behavior • Includes structural and behavioral dimensions • Represents implementations of patterns that make up a system Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
  • 20. Structural Elements 44.. UseUse CasesCases:: • Description of a sequence of actions that a system performs to deliver an observable result to a particular actor • Used to structure the behavioral• Used to structure the behavioral elements in a model • Realized by collaboration • Graphically rendered as an ellipse drawn with a solid line Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
  • 21. Structural Elements 55.. ActiveActive ClassesClasses:: • A class whose objects own one or more processes or threads and therefore can initiate an action • A class whose objects have concurrent behavior with otherconcurrent behavior with other objects • Graphically, an active class is rendered just like a class drawn with a thick line Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
  • 22. Structural Elements 6.6. ComponentComponent • is a physical and replaceable part of a system that conforms to and provides the realization of a set of interfaces.interfaces. • Graphically, a component is rendered as a rectangle with tabs • it also can be used to represent applications, files, libraries,pages and tables. • Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
  • 23. Structural Elements 77.. NodeNode ClassClass:: • is a physical element that exists at run time • represents a computational resource, generally having at least some memory and, often, processing capability.and, often, processing capability. • a set of components may reside in a node • components may also migrate from one node to another • Graphically, a node is rendered as a cube, usually including only its name Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
  • 24. Behavioral Elements 11.. InteractionInteraction:: • a set of messages exchanged among a set of objects within a particular context to accomplish a specific These are the dynamic parts of UML models. Represent behavior over time and space “verbs” of the model Save application() within a particular context to accomplish a specific purpose • specifies the behavior of a set of objects • involves a number of other elements: – messages, action sequences (behavior invoked by a message) and links (connection between objects) • graphically rendered as an arrow Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
  • 25. Behavioral Elements 22.. StateState MachineMachine:: • specifies a sequence of states an object or an interaction goes through during its lifetime and its response to external events • may specify the behavior of an individual class or a collaboration of classescollaboration of classes • includes a number of elements including states, transition, events and activities • presented as a rounded rectangle with a name and sub- • states Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
  • 26. Grouping Element 1.1. PackagePackage:: • mechanism for organizing elements into groups. Are the organizational parts of UML models. These are the boxes into which a model can be decomposed .There is one primary kind of grouping thing, namely, packages. into groups. • All elements can be placed in a package. • Graphically, a package is rendered as a tabbed folder, usually including only its name and, sometimes, its contents Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
  • 27. Annotational Element 1.1. NoteNote:: • comments added to models for better explanation or illumination on specific elements are the explanatory parts of UML models. These are the comments you may apply to describe about any element in a model. explanation or illumination on specific elements • explanatory aspect of UML models • notes are used primarily for annotation e.g. for rendering constraints and comments attached to elements or collections of elements • presented as a rectangle with a dog-eared corner • may include both textual and graphical comments Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
  • 28. Relationships in the UML 1.1. DependencyDependency:: There are four kinds of relationships in the UML: 1. Dependency 2. Association 3. Generalization 4. Realization 1.1. DependencyDependency:: • A semantic relationship between two elements in which a change to one element (independent element) may affect the meaning of the other (dependent element) • Given as a directed dashed line possibly with a label Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
  • 29. Relationships in the UML 22.. AssociationAssociation:: • a structural relationship describing a set of links • links are connections between objects • aggregation is a special type of association depicting whole-part relationshipwhole-part relationship • association is presented as a solid line, possibly directed, labeled and with adornments (multiplicity and role) Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
  • 30. Relationships in the UML 33.. GeneralizationGeneralization • a relationship in which objects of a specialized element (child) are substitutable for objects of a generalized element (parent) • child elements share the structure• child elements share the structure and behavior of the parent • rendered graphically as a solid line with hollow arrow head pointing to the parent Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
  • 31. Relationships in the UML 44.. RealizationRealization:: • a semantic relationship between elements, wherein one element specifies a contract and another guarantees to carry out this contract • relevant in two basic scenarios:• relevant in two basic scenarios: – interfaces versus realizing classes or components – uses cases versus realizing collaborations • graphically depicted as a dashed arrow with hollow head a cross between dependency and generalization Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
  • 32. Diagrams in UML • a graph presentation of a set of elements and relationships where: – nodes are elements – edges are relationships • UML includes nine such diagrams 1. Class Diagram Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
  • 33. Diagrams in UML 1. Class Diagram: o Static structure of a system o Show a set of classes, interfaces, collaboration, Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill interfaces, collaboration, and their relationships o address static design view of a system
  • 34. Diagrams in UML 2. Object Diagram: Static structure of a system at a particular time Show a set of objects and their relationships static snapshots of element instances found in class diagrams Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
  • 35. Diagrams in UML 3. Use Case Diagram: Functionality of a system Show a set of actors and use cases, and their relationships addresses static use case view of the system important for organizing and modeling the external behavior of the system Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill behavior of the system
  • 36. Diagrams in UML 4. Sequence Diagram: Interaction among elements of a system in a time sequence  show interactions consisting of a set of objects and the messages sent and received by Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill objects and the messages sent and received by those objects address the dynamic behavior of a system with special emphasis on the chronological ordering of messages
  • 37. Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
  • 38. Diagrams in UML 5.Collaboration Diagram: Interaction among elements and their relations organized in time and space Show the structural organization of objects Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill Show the structural organization of objects that send and receive messages Sequence and collaboration diagram are isomorphic i.e. one can be transformed into another
  • 39. Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
  • 40. Diagrams in UML 6. State Chart Diagram: The status condition and responses of the elements of a system Show a state machine consisting of states, transitions, events, and activities Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill events, and activities  address the dynamic view of a system  important in modeling the behavior of an interface, class or collaboration  emphasize on event-driven ordering
  • 41. Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
  • 42. Diagrams in UML 7. Activity Diagram: The activities of the system  a diagram showing control/data flows from one activity to another  addresses the dynamic view of a system, useful for Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill  addresses the dynamic view of a system, useful for modeling its functions  emphasizes the flow of control among objects
  • 43. Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
  • 44. Diagrams in UML 8.Component Diagram: The organization of the elements realizing the system Show the organization and dependencies amongst a set of components  address static implementation view of a system Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill  address static implementation view of a system  a component typically maps to one or more classes, interfaces or collaborations
  • 45. Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
  • 46. Diagrams in UML 9.Deployment Diagram: Configuration of environment elements and the mapping of elements realizing the system into them Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill
  • 47. Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill