SlideShare a Scribd company logo
1 of 111
Download to read offline
OBJECT-ORIENTED
SOFTWAREENGINEERING
UNIT 03 : Unified Modeling Language
© 2019, PRAMOD PARAJULI
Disclaimer
These slides are part of teaching materials for Object Oriented
Software Engineering (OOSE). These slides do not cover all
aspect of learning OOSE, nor are these be taken as primary
source of information. As the core textbooks and reference
books for learning the subject has already been specified and
provided to the students, students are encouraged to learn
from the original sources.
Contents in these slides are copyrighted to the instructor and
authors of original texts where applicable.
UNIFIEDMODELINGLANGUAGE
 Is a standard to model systems
 Is not a process! Optimally should be used in a process that is
use case driven, architecture-centric, iterative, and incremental.
 Helps to
– visualise a system throughout different phases of development.
– specify requirements
– design software components
– document (requirements, architecture, design, source code, project
plans, tests, prototypes, release)
BUILDINGBLOCKSOFUML
UML has 3 types of building blocks
 Things – abstraction of ‘first class citizens’
 Relationships – among things
 Diagrams – group interesting collections of things
THINGS
Things in UML
 Structural things
 Behavioral things
 Grouping things
 Annotational things
THINGS
Structural things
 Structural components, the noun part of models
 Class – set of objects e.g. Sensor
 Interface – externally visible behavior of an element
that specify a service of a class or component
 Collaboration
 Use case
 Active classes, components, and nodes
THINGS
Structural things
 Class – set of objects e.g. Sensor
Sensor
-name
-value
-time_stamp
+powerUp()
+calibrate()
+readSensor()
+setInterval()
THINGS
Structural things
 Interface – externally visible behavior of an
element that specify a service of a class or
component
 Interface defines only the specifications not the
implementations!
IReadSensorDat
a
THINGS
Structural things
 Collaboration – specify structure and behavior of
collaboration between entities
 We visualise such collaborations in use-case
diagrams and activity diagrams.
Init
Sensor
THINGS
Structural things
 Use case – specify description of set of sequence of
actions
 Used to structure the behavioral things
 Realised by a collaboration
Request
data
THINGS
Structural things
 Active class – a class that its objects represent
elements whose behavior is concurrent with other
elements.
EventManager
+start()
+stop()
+flush()
THINGS
Structural things
 Component – physical and replaceable part that
represents the packaging of logical elements such
as classes, interfaces and collaborations.
 COM+, Java Beans etc.
sensordata.java
THINGS
Structural things
 Node – exists at runtime and represents a
computational resource
 Contains a set of components
WebServer
THINGS
Structural things
 Structural components, the noun part of models
 Class – set of objects e.g. Sensor
 Interface – externally visible behavior of an element
that specify a service of a class or component
 Collaboration
 Use case
 Active classes, components, and nodes
THINGS
Behavioral things
 Represent dynamic components in UML models, the
verb part of UML models
 Two types;
– Interaction
– State machine
THINGS
Behavioral things
 Interaction – messages passed between/among
components
display
THINGS
Behavioral things
 State machine – specifies the sequence of states an
object or an interaction goes through during its
lifetime in response to events
Waiting
THINGS
Grouping things
 Packages – organise elements into groups
Conversion rules
THINGS
Annotational things
 Notes – explanatory parts of UML model
regex for
formatting
RELATIONSHIPS
Relationships in UML
 Dependency
 Association
 Generalisation
 Realisation
RELATIONSHIPS
Relationships in UML
 Dependency – shows semantic relationship
between two things in which a change to one
thing (independent) may affect the semantics of
the other (dependent)
RELATIONSHIPS
Relationships in UML
 Association – shows links among objects along with
labels and multiplicity
weather station sensor
0..1 *
RELATIONSHIPS
Relationships in UML
 Generalisation – shows
generalisation/specialisation relationships in
which objects of specialised element (the child)
are substitutable for objects of generalised
element (the parent)
RELATIONSHIPS
Relationships in UML
 Realisation – semantic relationship between
classifiers.
 Used between interfaces and classes or
components that realise them, and between use
cases and the collaborations that realise them.
UMLNOTATIONS(DIAGRAMS)
UNIT 03: Object Orientation Fundamentals and UML
References:
• Booch et al., The Unified Modeling Language User Guide, Pearson. and
• Booch et al., Object-Oriented Analysis and Design with Applications, 3rd
ed., Addison-Wesley., Chapter 5.
DIAGRAMS
Diagrams in UML
 Graphical representation
of a set of elements
 Different combination of
elements serve different
purpose
 Package diagram
 Component diagrams
 Deployment diagrams
 Use case diagrams
 Activity diagrams
 Class diagrams
 Sequence diagrams
 Interaction overview diagrams
 Composite structure diagrams
 State machine diagrams
 Timing diagrams
 Object diagrams
 Communication diagrams
Process segments
Requirements Analysis Design Development Deployment
UML
diagrams
Use case diagram
Sponsor
objectives
Conceptual
model
Class diagram
Conceptual
level classes
Specification
level classes
Implementation
level classes
Object diagram Identify objects Identify objects
State diagram
Object
behavior
Sequence diagram
Object
interaction
Collaboration diagram
Object
interaction
Activity diagram
User
operation(s)
System
operations
Component diagram
Visualise
components
Package diagram
System
requirements
Deployment diagrams
System
elements
System
integration
System
integration
STRUCTUREDIAGRAMS
 Package diagram
 Class diagram
 Component diagram
 Deployment diagram
 Object diagram
 Composite structure diagram
BEHAVIORDIAGRAMS
 Use-case diagrams
 Activity diagram
 State machine diagram
 Interaction diagrams
– Sequence diagram
– Communication diagram
– Interaction overview diagram
– Timing diagram
Example on the book for diagrams:
Hydroponics Gardening System
PACKAGEDIAGRAMS
It is essential to organise
OOAD artifacts;
 Provide clarity and
understanding of complex
system development
 Supports concurrent model
used by multiple users
 Supports version control
 Provides abstraction at
multiple levels – from
systems to classes in a
component
 Provides encapsulation and
containment; supports
modularity.
 (fig. 5-2, 5-3)
PACKAGEDIAGRAMS
PACKAGEDIAGRAMS
PACKAGEDIAGRAMS
Visibility of elements
 Public ( + ) – can be thought
as package interface
 Private ( - )
 (fig. 5-4)
Dependency relationship
 Elements of package depends
on elements of the same or
other packages
 Tail of the arrow – dependent
(client)
 Arrowhead – supporter (supplier)
 Type of dependency – defined
within guillemets ( « » )
e.g. «import»
 (fig. 5-5)
PACKAGEDIAGRAMS
PACKAGEDIAGRAMS
PACKAGEDIAGRAMS
 Multiple dependencies
between packages are
aggregated to the level of
containing package.
(fig. 5-6)
 Package diagrams can also be
used to show different model
elements such as classes, (fig. 5-
7)
 Can also be used on UML diagrams
that are not structure diagrams
e.g. use cases
 Usage
package_name::element_
name
PACKAGEDIAGRAMS
PACKAGEDIAGRAMS
PACKAGEDIAGRAMS
Advanced concepts
 Import – import public package
 Access – within the package
 (fig. 5-8)
COMPONENTDIAGRAMS
 Components
– reusable piece of software,
– provides meaningful aggregation of
functionality
– collaborate with other through well-defined
interfaces
COMPONENTDIAGRAMS
 Components
– ports – have public visibility unless otherwise
noted, kept on the boundary
– components may have hidden ports (kept
totally inside the boundary), used for testing
– Named as
port_name:Port_Type
– Use of ball and socket, (fig. 5-9)
COMPONENTDIAGRAMS
 Components – interfaces
– Interfaces can be grouped, (fig. 5-10)
– An example of component diagram, (fig. 5-11)
– Interface specification, (fig. 5-12)
– Alternate notation for the interface, (fig. 5-13)
– Realization of dependencies, (fig. 5-14)
– Containment of realization, (fig. 5-15)
COMPONENTDIAGRAMS
 Components – internal structure
– A component may contain subsystems
– These subsystems have their own interfaces
– (fig. 5-16)
DEPLOYMENTDIAGRAMS
 Shows allocation of artifacts to nodes in the physical
design of a system
 3 essential elements
– Artifacts
– Nodes
– Their connections
DEPLOYMENTDIAGRAMS
 The artifact notation – using <<manifest>>, (fig. 5-17)
 The node notation – represents computational resource
 Two types of nodes;
– Devices
– Execution environment
 Nodes can have multiplicity, (fig. 5-18)
 Example of a deployment diagram, (fig. 5-19)
USE-CASEDIAGRAMS
 Specify business needs
 Includes roles as actors (fig. 5-20)
 Shows who needs what
 Use cases – a function
 Use case diagram (exists in environment, may
have system boundary) (fig. 5-22)
USE-CASEDIAGRAMS
 Use cases are detailed using use case specification,
example on p.179
 Use case diagram may include «include» and
«extend» relationships among the use cases,
(fig. 5-25)
 When to use «include» and «extend»? (table 5-1,
p. 184)
 Advanced concept: generalization (fig. 5-26)
ACTIVITYDIAGRAMS
 Representing flow of process graphically, has very high
semantics
 Elements: action nodes, control nodes, and object
nodes.
 Control notes – 3 types:
– initial and final (activity final and flow final), (fig. 5-28)
– decision and merge (fig. 5-29, fig. 5-30), and
– fork and join (fig. 5-31)
 Activity diagram with objects (fig. 5-32)
CLASSDIAGRAMS
 Class notations (fig. 5-33)
 Set of attributes, methods
 Detailed attribute and operation specification
 Abstract class – has no instances (italicize the
name) (fig. 5-34) – FoodItem
 Subclass (Tomato) inherits the abstract class
 Content (has-a relationship)
 Class relationship may contain multiplicity
CLASSDIAGRAMS
 Class relationships (fig. 5-35)
– Association
– Generalisation
– Aggregation
– Composition
 Classes can be used to represent physical containment
(fig. 5-36)
CLASSDIAGRAMS
Advanced concepts
 Template classes (fig. 5-37)
 Visibility of elements (fig. 3-38)
– Public ( + )
– Protected ( # )
– Private ( - )
– Package ( ~ )
 Association end names and qualifiers (roles
played by classes), (fig. 5-39)
CLASSDIAGRAMS
Advanced concepts
 Constraints – can be specifies for classes
and their relationships, (fig. 5-40)
 Association classes and notes, (fig. 5-41)
SEQUENCEDIAGRAMS
 Used to trace the execution of a scenario in the same
context as a communication diagram (included together).
 Objects and interactions – lifelines and messages
(events/invocation of operations), (fig. 5-42)
 Different notations can be used for types of messages (fig.
5-43)
 Destruction events
INTERACTIONOVERVIEWDIAGRAMS
 Combination of activity diagram and interaction
diagram.
 Provide overview of the flow control between
interaction diagram elements.
 Any interaction diagram can be used. But in most cases,
sequence diagram is used.
 Flow of control elements (fig. 5-49), for parallel paths,
a fork node is used.
COMPOSITESTRUCTUREDIAGRAMS
 Explains structured classifier with the definition of its internal
structure.
 The internal structure contains parts and their relationships.
 They can be nested.
 Useful for decomposition of models.
 Essential elements - parts, ports, interfaces, connectors
 Example: (fig. 5-50)
STATEMACHINEDIAGRAMS
 Useful to model time-critical systems
 Shows behavior progression through a series of states,
triggered by events.
 Typically used to describe the behavior of individual
objects.
 Applicable to only those classes that exhibit event-ordered
behavior.
 Useful to analyse and design dynamic behavior.
STATEMACHINEDIAGRAMS
 Initial, final, and simple states, (fig. 5-52)
 Transition and events – movement between states, (fig. 5-
53)
 A transition without any annotation is called complete
transition.
 States can have additional states, (fig. 5-54)
STATEMACHINEDIAGRAMS
Advanced concepts
 State activities – entry, do and exit, (fig. 5-55)
 Controlling transitions use;
– If-then conditions
– Effects of states (fig. 5-56)
 Composite and nested states, (fig. 5-57, 5-58)
 Concurrency and control, (fig. 5-59 – 67)
 Sub-machine state, (fig. 5-68)
TIMINGDIAGRAMS
 Model timing requirements of given system
 Reuse elements that appear in other UML diagrams.
 (fig. 5-69, 5-70)
 Events and constrains can be defined, (fig. 5-71, 5-72)
TIMINGDIAGRAMS
Advanced concepts
 Alternate representations, (fig. 5-73)
 Events vs. messages, (fig. 5-74)
OBJECTDIAGRAMS
 Model objects and their relationships in logical design of a
system
 Represents a snapshot in time of events over a certain
configuration of objects.
 During analysis, used to indicate semantics of primary and
secondary scenarios
 During design, used to illustrate the semantics of
mechanisms in the logical design of a system
OBJECTDIAGRAMS
Two elements
 Objects, (fig. 5-75)
 Relationships, (fig. 5-76)
 May use end names and qualifiers
COMMUNICATIONDIAGRAMS
 A type of interaction diagram that shows how objects are
linked and what messages they pass
 Contain;
– Objects
– Links
– Messages
 Sequence is expressed (fig. 5-77)
COMMUNICATIONDIAGRAMS
 Synchronisation is supported, (fig. 5-79)
 Iterations and conditions, (fig. 5-80)
End of Unit 03 : UML

More Related Content

What's hot

Architectural structures and views
Architectural structures and viewsArchitectural structures and views
Architectural structures and viewsDr Reeja S R
 
Object-Oriented Analysis And Design With Applications Grady Booch
Object-Oriented Analysis And Design With Applications Grady BoochObject-Oriented Analysis And Design With Applications Grady Booch
Object-Oriented Analysis And Design With Applications Grady BoochSorina Chirilă
 
Object Oriented Analysis and Design
Object Oriented Analysis and DesignObject Oriented Analysis and Design
Object Oriented Analysis and DesignAnirban Majumdar
 
4+1view architecture
4+1view architecture4+1view architecture
4+1view architecturedrewz lin
 
Architecture and design
Architecture and designArchitecture and design
Architecture and designhimanshu_airon
 
Unified modelling language (UML)
Unified modelling language (UML)Unified modelling language (UML)
Unified modelling language (UML)Hirra Sultan
 
Architectural views
Architectural viewsArchitectural views
Architectural viewsSaleem Khan
 
Ooad lab manual
Ooad  lab manualOoad  lab manual
Ooad lab manualPraseela R
 
Uml Explained Step ByStep
Uml Explained Step ByStepUml Explained Step ByStep
Uml Explained Step ByStepWaseem Khan
 
"Just Enough" System Modeling
"Just Enough" System Modeling"Just Enough" System Modeling
"Just Enough" System ModelingProf. Amir Tomer
 
Object Oriented, Design patterns and data modelling worshop
Object Oriented, Design patterns and data modelling worshopObject Oriented, Design patterns and data modelling worshop
Object Oriented, Design patterns and data modelling worshopMohammad Shawahneh
 
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 audioRickNZ
 
Importance & Principles of Modeling from UML Designing
Importance & Principles of Modeling from UML DesigningImportance & Principles of Modeling from UML Designing
Importance & Principles of Modeling from UML DesigningABHISHEK KUMAR
 

What's hot (20)

Architectural structures and views
Architectural structures and viewsArchitectural structures and views
Architectural structures and views
 
Object-Oriented Analysis And Design With Applications Grady Booch
Object-Oriented Analysis And Design With Applications Grady BoochObject-Oriented Analysis And Design With Applications Grady Booch
Object-Oriented Analysis And Design With Applications Grady Booch
 
Uml
UmlUml
Uml
 
Unified Modeling Language
Unified Modeling LanguageUnified Modeling Language
Unified Modeling Language
 
0136061257
01360612570136061257
0136061257
 
Object Oriented Analysis and Design
Object Oriented Analysis and DesignObject Oriented Analysis and Design
Object Oriented Analysis and Design
 
4+1view architecture
4+1view architecture4+1view architecture
4+1view architecture
 
Architecture and design
Architecture and designArchitecture and design
Architecture and design
 
Unified modelling language (UML)
Unified modelling language (UML)Unified modelling language (UML)
Unified modelling language (UML)
 
Architectural views
Architectural viewsArchitectural views
Architectural views
 
Ooad lab manual
Ooad  lab manualOoad  lab manual
Ooad lab manual
 
Complexity
ComplexityComplexity
Complexity
 
Uml Explained Step ByStep
Uml Explained Step ByStepUml Explained Step ByStep
Uml Explained Step ByStep
 
"Just Enough" System Modeling
"Just Enough" System Modeling"Just Enough" System Modeling
"Just Enough" System Modeling
 
Object Oriented, Design patterns and data modelling worshop
Object Oriented, Design patterns and data modelling worshopObject Oriented, Design patterns and data modelling worshop
Object Oriented, Design patterns and data modelling worshop
 
Introduction to OOAD
Introduction to OOADIntroduction to OOAD
Introduction to OOAD
 
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
 
Lecture 4
Lecture 4Lecture 4
Lecture 4
 
Importance & Principles of Modeling from UML Designing
Importance & Principles of Modeling from UML DesigningImportance & Principles of Modeling from UML Designing
Importance & Principles of Modeling from UML Designing
 
Unified Modeling Language
Unified Modeling LanguageUnified Modeling Language
Unified Modeling Language
 

Similar to UML

Darshan sem4 140703_ooad_2014 (diagrams)
Darshan sem4 140703_ooad_2014 (diagrams)Darshan sem4 140703_ooad_2014 (diagrams)
Darshan sem4 140703_ooad_2014 (diagrams)Gajeshwar Bahekar
 
UML- Unified Modeling Language
UML- Unified Modeling LanguageUML- Unified Modeling Language
UML- Unified Modeling LanguageShahzad
 
Software architecture with SOA modeling Flavor
Software architecture with SOA modeling FlavorSoftware architecture with SOA modeling Flavor
Software architecture with SOA modeling FlavorMohamed Zakarya Abdelgawad
 
UML-Advanced Software Engineering
UML-Advanced Software EngineeringUML-Advanced Software Engineering
UML-Advanced Software EngineeringAmit Singh
 
ASP.NET System design 2
ASP.NET System design 2ASP.NET System design 2
ASP.NET System design 2Sisir Ghosh
 
Object-oriented modeling and design.pdf
Object-oriented modeling and  design.pdfObject-oriented modeling and  design.pdf
Object-oriented modeling and design.pdfSHIVAM691605
 
M02 Uml Overview
M02 Uml OverviewM02 Uml Overview
M02 Uml OverviewDang Tuan
 
Object Oriented Design in Software Engineering SE12
Object Oriented Design in Software Engineering SE12Object Oriented Design in Software Engineering SE12
Object Oriented Design in Software Engineering SE12koolkampus
 
Advanced Structural Modeling
Advanced Structural ModelingAdvanced Structural Modeling
Advanced Structural ModelingAMITJain879
 
Unified Modeling Language
Unified Modeling LanguageUnified Modeling Language
Unified Modeling Languagesurana college
 
Interaction overview and Profile UML Diagrams
Interaction overview and Profile UML DiagramsInteraction overview and Profile UML Diagrams
Interaction overview and Profile UML DiagramsHusnain Safdar
 

Similar to UML (20)

Darshan sem4 140703_ooad_2014 (diagrams)
Darshan sem4 140703_ooad_2014 (diagrams)Darshan sem4 140703_ooad_2014 (diagrams)
Darshan sem4 140703_ooad_2014 (diagrams)
 
uml2-1214558329929112-8.ppt
uml2-1214558329929112-8.pptuml2-1214558329929112-8.ppt
uml2-1214558329929112-8.ppt
 
Apostila UML
Apostila UMLApostila UML
Apostila UML
 
UML- Unified Modeling Language
UML- Unified Modeling LanguageUML- Unified Modeling Language
UML- Unified Modeling Language
 
Software architecture with SOA modeling Flavor
Software architecture with SOA modeling FlavorSoftware architecture with SOA modeling Flavor
Software architecture with SOA modeling Flavor
 
UML-Advanced Software Engineering
UML-Advanced Software EngineeringUML-Advanced Software Engineering
UML-Advanced Software Engineering
 
Sda 9
Sda   9Sda   9
Sda 9
 
ASP.NET System design 2
ASP.NET System design 2ASP.NET System design 2
ASP.NET System design 2
 
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
 
Ooad
OoadOoad
Ooad
 
Ch14
Ch14Ch14
Ch14
 
Uml
UmlUml
Uml
 
Object-oriented modeling and design.pdf
Object-oriented modeling and  design.pdfObject-oriented modeling and  design.pdf
Object-oriented modeling and design.pdf
 
M02 Uml Overview
M02 Uml OverviewM02 Uml Overview
M02 Uml Overview
 
Object Oriented Design in Software Engineering SE12
Object Oriented Design in Software Engineering SE12Object Oriented Design in Software Engineering SE12
Object Oriented Design in Software Engineering SE12
 
Advanced Structural Modeling
Advanced Structural ModelingAdvanced Structural Modeling
Advanced Structural Modeling
 
Uml - An Overview
Uml - An OverviewUml - An Overview
Uml - An Overview
 
Unified Modeling Language
Unified Modeling LanguageUnified Modeling Language
Unified Modeling Language
 
Interaction overview and Profile UML Diagrams
Interaction overview and Profile UML DiagramsInteraction overview and Profile UML Diagrams
Interaction overview and Profile UML Diagrams
 
Intro Uml
Intro UmlIntro Uml
Intro Uml
 

More from Pramod Parajuli

Software Quality Assurance
Software Quality AssuranceSoftware Quality Assurance
Software Quality AssurancePramod Parajuli
 
Software Testing Techniques
Software Testing TechniquesSoftware Testing Techniques
Software Testing TechniquesPramod Parajuli
 
Object Oriented Analysis
Object Oriented AnalysisObject Oriented Analysis
Object Oriented AnalysisPramod Parajuli
 
Project Mangement Planning and Risk Analysis
Project Mangement Planning and Risk AnalysisProject Mangement Planning and Risk Analysis
Project Mangement Planning and Risk AnalysisPramod Parajuli
 
COCOMO methods for software size estimation
COCOMO methods for software size estimationCOCOMO methods for software size estimation
COCOMO methods for software size estimationPramod Parajuli
 
Object Oriented Implementation
Object Oriented ImplementationObject Oriented Implementation
Object Oriented ImplementationPramod Parajuli
 

More from Pramod Parajuli (7)

Software Quality Assurance
Software Quality AssuranceSoftware Quality Assurance
Software Quality Assurance
 
Software Testing Techniques
Software Testing TechniquesSoftware Testing Techniques
Software Testing Techniques
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented Design
 
Object Oriented Analysis
Object Oriented AnalysisObject Oriented Analysis
Object Oriented Analysis
 
Project Mangement Planning and Risk Analysis
Project Mangement Planning and Risk AnalysisProject Mangement Planning and Risk Analysis
Project Mangement Planning and Risk Analysis
 
COCOMO methods for software size estimation
COCOMO methods for software size estimationCOCOMO methods for software size estimation
COCOMO methods for software size estimation
 
Object Oriented Implementation
Object Oriented ImplementationObject Oriented Implementation
Object Oriented Implementation
 

Recently uploaded

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 

Recently uploaded (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

UML

  • 1. OBJECT-ORIENTED SOFTWAREENGINEERING UNIT 03 : Unified Modeling Language © 2019, PRAMOD PARAJULI
  • 2. Disclaimer These slides are part of teaching materials for Object Oriented Software Engineering (OOSE). These slides do not cover all aspect of learning OOSE, nor are these be taken as primary source of information. As the core textbooks and reference books for learning the subject has already been specified and provided to the students, students are encouraged to learn from the original sources. Contents in these slides are copyrighted to the instructor and authors of original texts where applicable.
  • 3. UNIFIEDMODELINGLANGUAGE  Is a standard to model systems  Is not a process! Optimally should be used in a process that is use case driven, architecture-centric, iterative, and incremental.  Helps to – visualise a system throughout different phases of development. – specify requirements – design software components – document (requirements, architecture, design, source code, project plans, tests, prototypes, release)
  • 4. BUILDINGBLOCKSOFUML UML has 3 types of building blocks  Things – abstraction of ‘first class citizens’  Relationships – among things  Diagrams – group interesting collections of things
  • 5. THINGS Things in UML  Structural things  Behavioral things  Grouping things  Annotational things
  • 6. THINGS Structural things  Structural components, the noun part of models  Class – set of objects e.g. Sensor  Interface – externally visible behavior of an element that specify a service of a class or component  Collaboration  Use case  Active classes, components, and nodes
  • 7. THINGS Structural things  Class – set of objects e.g. Sensor Sensor -name -value -time_stamp +powerUp() +calibrate() +readSensor() +setInterval()
  • 8. THINGS Structural things  Interface – externally visible behavior of an element that specify a service of a class or component  Interface defines only the specifications not the implementations! IReadSensorDat a
  • 9. THINGS Structural things  Collaboration – specify structure and behavior of collaboration between entities  We visualise such collaborations in use-case diagrams and activity diagrams. Init Sensor
  • 10. THINGS Structural things  Use case – specify description of set of sequence of actions  Used to structure the behavioral things  Realised by a collaboration Request data
  • 11. THINGS Structural things  Active class – a class that its objects represent elements whose behavior is concurrent with other elements. EventManager +start() +stop() +flush()
  • 12. THINGS Structural things  Component – physical and replaceable part that represents the packaging of logical elements such as classes, interfaces and collaborations.  COM+, Java Beans etc. sensordata.java
  • 13. THINGS Structural things  Node – exists at runtime and represents a computational resource  Contains a set of components WebServer
  • 14. THINGS Structural things  Structural components, the noun part of models  Class – set of objects e.g. Sensor  Interface – externally visible behavior of an element that specify a service of a class or component  Collaboration  Use case  Active classes, components, and nodes
  • 15. THINGS Behavioral things  Represent dynamic components in UML models, the verb part of UML models  Two types; – Interaction – State machine
  • 16. THINGS Behavioral things  Interaction – messages passed between/among components display
  • 17. THINGS Behavioral things  State machine – specifies the sequence of states an object or an interaction goes through during its lifetime in response to events Waiting
  • 18. THINGS Grouping things  Packages – organise elements into groups Conversion rules
  • 19. THINGS Annotational things  Notes – explanatory parts of UML model regex for formatting
  • 20. RELATIONSHIPS Relationships in UML  Dependency  Association  Generalisation  Realisation
  • 21. RELATIONSHIPS Relationships in UML  Dependency – shows semantic relationship between two things in which a change to one thing (independent) may affect the semantics of the other (dependent)
  • 22. RELATIONSHIPS Relationships in UML  Association – shows links among objects along with labels and multiplicity weather station sensor 0..1 *
  • 23. RELATIONSHIPS Relationships in UML  Generalisation – shows generalisation/specialisation relationships in which objects of specialised element (the child) are substitutable for objects of generalised element (the parent)
  • 24. RELATIONSHIPS Relationships in UML  Realisation – semantic relationship between classifiers.  Used between interfaces and classes or components that realise them, and between use cases and the collaborations that realise them.
  • 25. UMLNOTATIONS(DIAGRAMS) UNIT 03: Object Orientation Fundamentals and UML References: • Booch et al., The Unified Modeling Language User Guide, Pearson. and • Booch et al., Object-Oriented Analysis and Design with Applications, 3rd ed., Addison-Wesley., Chapter 5.
  • 26. DIAGRAMS Diagrams in UML  Graphical representation of a set of elements  Different combination of elements serve different purpose  Package diagram  Component diagrams  Deployment diagrams  Use case diagrams  Activity diagrams  Class diagrams  Sequence diagrams  Interaction overview diagrams  Composite structure diagrams  State machine diagrams  Timing diagrams  Object diagrams  Communication diagrams
  • 27.
  • 28. Process segments Requirements Analysis Design Development Deployment UML diagrams Use case diagram Sponsor objectives Conceptual model Class diagram Conceptual level classes Specification level classes Implementation level classes Object diagram Identify objects Identify objects State diagram Object behavior Sequence diagram Object interaction Collaboration diagram Object interaction Activity diagram User operation(s) System operations Component diagram Visualise components Package diagram System requirements Deployment diagrams System elements System integration System integration
  • 29. STRUCTUREDIAGRAMS  Package diagram  Class diagram  Component diagram  Deployment diagram  Object diagram  Composite structure diagram
  • 30. BEHAVIORDIAGRAMS  Use-case diagrams  Activity diagram  State machine diagram  Interaction diagrams – Sequence diagram – Communication diagram – Interaction overview diagram – Timing diagram
  • 31. Example on the book for diagrams: Hydroponics Gardening System
  • 32. PACKAGEDIAGRAMS It is essential to organise OOAD artifacts;  Provide clarity and understanding of complex system development  Supports concurrent model used by multiple users  Supports version control  Provides abstraction at multiple levels – from systems to classes in a component  Provides encapsulation and containment; supports modularity.  (fig. 5-2, 5-3)
  • 35. PACKAGEDIAGRAMS Visibility of elements  Public ( + ) – can be thought as package interface  Private ( - )  (fig. 5-4) Dependency relationship  Elements of package depends on elements of the same or other packages  Tail of the arrow – dependent (client)  Arrowhead – supporter (supplier)  Type of dependency – defined within guillemets ( « » ) e.g. «import»  (fig. 5-5)
  • 38. PACKAGEDIAGRAMS  Multiple dependencies between packages are aggregated to the level of containing package. (fig. 5-6)  Package diagrams can also be used to show different model elements such as classes, (fig. 5- 7)  Can also be used on UML diagrams that are not structure diagrams e.g. use cases  Usage package_name::element_ name
  • 41. PACKAGEDIAGRAMS Advanced concepts  Import – import public package  Access – within the package  (fig. 5-8)
  • 42.
  • 43. COMPONENTDIAGRAMS  Components – reusable piece of software, – provides meaningful aggregation of functionality – collaborate with other through well-defined interfaces
  • 44. COMPONENTDIAGRAMS  Components – ports – have public visibility unless otherwise noted, kept on the boundary – components may have hidden ports (kept totally inside the boundary), used for testing – Named as port_name:Port_Type – Use of ball and socket, (fig. 5-9)
  • 45.
  • 46. COMPONENTDIAGRAMS  Components – interfaces – Interfaces can be grouped, (fig. 5-10) – An example of component diagram, (fig. 5-11) – Interface specification, (fig. 5-12) – Alternate notation for the interface, (fig. 5-13) – Realization of dependencies, (fig. 5-14) – Containment of realization, (fig. 5-15)
  • 47.
  • 48.
  • 49.
  • 50.
  • 51.
  • 52. COMPONENTDIAGRAMS  Components – internal structure – A component may contain subsystems – These subsystems have their own interfaces – (fig. 5-16)
  • 53.
  • 54. DEPLOYMENTDIAGRAMS  Shows allocation of artifacts to nodes in the physical design of a system  3 essential elements – Artifacts – Nodes – Their connections
  • 55. DEPLOYMENTDIAGRAMS  The artifact notation – using <<manifest>>, (fig. 5-17)  The node notation – represents computational resource  Two types of nodes; – Devices – Execution environment  Nodes can have multiplicity, (fig. 5-18)  Example of a deployment diagram, (fig. 5-19)
  • 56.
  • 57.
  • 58.
  • 59. USE-CASEDIAGRAMS  Specify business needs  Includes roles as actors (fig. 5-20)  Shows who needs what  Use cases – a function  Use case diagram (exists in environment, may have system boundary) (fig. 5-22)
  • 60.
  • 61. USE-CASEDIAGRAMS  Use cases are detailed using use case specification, example on p.179  Use case diagram may include «include» and «extend» relationships among the use cases, (fig. 5-25)  When to use «include» and «extend»? (table 5-1, p. 184)  Advanced concept: generalization (fig. 5-26)
  • 62.
  • 63.
  • 64.
  • 65. ACTIVITYDIAGRAMS  Representing flow of process graphically, has very high semantics  Elements: action nodes, control nodes, and object nodes.  Control notes – 3 types: – initial and final (activity final and flow final), (fig. 5-28) – decision and merge (fig. 5-29, fig. 5-30), and – fork and join (fig. 5-31)  Activity diagram with objects (fig. 5-32)
  • 66.
  • 67.
  • 68.
  • 69.
  • 70. CLASSDIAGRAMS  Class notations (fig. 5-33)  Set of attributes, methods  Detailed attribute and operation specification  Abstract class – has no instances (italicize the name) (fig. 5-34) – FoodItem  Subclass (Tomato) inherits the abstract class  Content (has-a relationship)  Class relationship may contain multiplicity
  • 71.
  • 72. CLASSDIAGRAMS  Class relationships (fig. 5-35) – Association – Generalisation – Aggregation – Composition  Classes can be used to represent physical containment (fig. 5-36)
  • 73.
  • 74.
  • 75. CLASSDIAGRAMS Advanced concepts  Template classes (fig. 5-37)  Visibility of elements (fig. 3-38) – Public ( + ) – Protected ( # ) – Private ( - ) – Package ( ~ )  Association end names and qualifiers (roles played by classes), (fig. 5-39)
  • 76.
  • 77.
  • 78. CLASSDIAGRAMS Advanced concepts  Constraints – can be specifies for classes and their relationships, (fig. 5-40)  Association classes and notes, (fig. 5-41)
  • 79.
  • 80.
  • 81. SEQUENCEDIAGRAMS  Used to trace the execution of a scenario in the same context as a communication diagram (included together).  Objects and interactions – lifelines and messages (events/invocation of operations), (fig. 5-42)  Different notations can be used for types of messages (fig. 5-43)  Destruction events
  • 82.
  • 83.
  • 84. INTERACTIONOVERVIEWDIAGRAMS  Combination of activity diagram and interaction diagram.  Provide overview of the flow control between interaction diagram elements.  Any interaction diagram can be used. But in most cases, sequence diagram is used.  Flow of control elements (fig. 5-49), for parallel paths, a fork node is used.
  • 85.
  • 86. COMPOSITESTRUCTUREDIAGRAMS  Explains structured classifier with the definition of its internal structure.  The internal structure contains parts and their relationships.  They can be nested.  Useful for decomposition of models.  Essential elements - parts, ports, interfaces, connectors  Example: (fig. 5-50)
  • 87.
  • 88. STATEMACHINEDIAGRAMS  Useful to model time-critical systems  Shows behavior progression through a series of states, triggered by events.  Typically used to describe the behavior of individual objects.  Applicable to only those classes that exhibit event-ordered behavior.  Useful to analyse and design dynamic behavior.
  • 89. STATEMACHINEDIAGRAMS  Initial, final, and simple states, (fig. 5-52)  Transition and events – movement between states, (fig. 5- 53)  A transition without any annotation is called complete transition.  States can have additional states, (fig. 5-54)
  • 90.
  • 91.
  • 92. STATEMACHINEDIAGRAMS Advanced concepts  State activities – entry, do and exit, (fig. 5-55)  Controlling transitions use; – If-then conditions – Effects of states (fig. 5-56)  Composite and nested states, (fig. 5-57, 5-58)  Concurrency and control, (fig. 5-59 – 67)  Sub-machine state, (fig. 5-68)
  • 93.
  • 94.
  • 95.
  • 96.
  • 97.
  • 98. TIMINGDIAGRAMS  Model timing requirements of given system  Reuse elements that appear in other UML diagrams.  (fig. 5-69, 5-70)  Events and constrains can be defined, (fig. 5-71, 5-72)
  • 99.
  • 100.
  • 101. TIMINGDIAGRAMS Advanced concepts  Alternate representations, (fig. 5-73)  Events vs. messages, (fig. 5-74)
  • 102.
  • 103. OBJECTDIAGRAMS  Model objects and their relationships in logical design of a system  Represents a snapshot in time of events over a certain configuration of objects.  During analysis, used to indicate semantics of primary and secondary scenarios  During design, used to illustrate the semantics of mechanisms in the logical design of a system
  • 104. OBJECTDIAGRAMS Two elements  Objects, (fig. 5-75)  Relationships, (fig. 5-76)  May use end names and qualifiers
  • 105.
  • 106. COMMUNICATIONDIAGRAMS  A type of interaction diagram that shows how objects are linked and what messages they pass  Contain; – Objects – Links – Messages  Sequence is expressed (fig. 5-77)
  • 107.
  • 108. COMMUNICATIONDIAGRAMS  Synchronisation is supported, (fig. 5-79)  Iterations and conditions, (fig. 5-80)
  • 109.
  • 110.
  • 111. End of Unit 03 : UML