尊敬的 微信汇率:1円 ≈ 0.046166 元 支付宝汇率:1円 ≈ 0.046257元 [退出登录]
SlideShare a Scribd company logo
Unified Modeling Language
(UML)
PRESENTED BY
Y. N. D. ARAVIND,
M.TECH, DEPT OF CSE,
NEWTON’S GROUP OF INSTITUTIONS, MACHERLA.
Introduction to UML 2
@2020 Presented by Y.N.D. Aravind
Why do we
Model
Conceptual
Model of UML
Architecture Classes
Relationships
Common
Mechanisms
Class
Diagrams
Object
Diagrams
A Brief History 3
@2020 Presented by Y.N.D. Aravind
A Brief History 4
@2020 Presented by Y.N.D. Aravind
Why do we Model ? 5
@2020 Presented by Y.N.D. Aravind
1. Importance of Modeling:
Why do we model?
A model is a simplification at some level of abstraction
We build models to better understand the systems we are developing.
 To help us visualize
 To specify structure or behavior
 To provide template for building system
 To document decisions we have made
2. Principles of Modeling:
The models we choose have a profound influence on the solution we provide
Every model may be expressed at different levels of abstraction
The best models are connected to reality
No single model is sufficient, a set of models is needed to solve any nontrivial system
UML is a visual modeling language
“A picture is worth a thousand words.” - old saying
Unified Modeling Language:
“A language provides a vocabulary and the rules for combining words [...] for the purpose of communication.
Why do we Model ? 6
@2020 Presented by Y.N.D. Aravind
3. Object Oriented Modeling:
In software, there are several ways to approach a model. The two most common ways are
1. Algorithmic perspective
2. Object-oriented perspective
4. Unified Modeling Language(UML)
The Unified Modeling Language is a standard language for writing software blueprints. The UML may be used to visualize, specify, construct,
and document the artifacts of a software-intensive system.
The UML is appropriate for modeling systems ranging from enterprise information systems to distributed Web-based applications and even to hard real
time embedded systems. It is a very expressive language, addressing all the views needed to develop and then deploy such systems.
The UML is a language for
 Visualizing
 Specifying
 Constructing
 Documenting
Conceptual Model of UML
7
@2020 Presented by Y.N.D. Aravind
To understand the UML, you need to form a
conceptual model of the language, and this
requires learning three major elements:
1. Things
2. Relationships
3. Diagrams
Building Blocks of the UML
8
Things RELATIONSHIPS DIAGRAMS
1. Structural things
2. Behavioral things
3. Grouping things
4. Annotational things
1. Dependency
2. Association
3. Generalization
4. Realization
1. Class diagram
2. Object diagram
3. Component diagram
4. Composite structure diagram
5. Use case diagram
6. Sequence diagram
7. Communication diagram
8. State diagram
9. Activity diagram
10. Deployment diagram
11. Package diagram
12. Timing diagram
13. Interaction overview diagram
Building Blocks of the UML
9Seven Types of Structural Things
1. Class - An object with defined attributes and operations. A class in UML is very much like a class
in C++.
2. Interface - A collection of functions that specify a service of a class or component, i.e. externally
visible behavior of that class.
3. Collaboration - A larger pattern of behaviors and actions. Example: All classes and behaviors
that create the modeling of a moving tank in a simulation.
4. Use Case - A sequence of actions that a system performs that yields an observable result. Used to
structure behavior in a model. Is realized by a collaboration.
5. Active Class - Like a class but its represents behavior that runs concurrent with other behaviors,
i.e. threading.
6. Component - A physical and replaceable part of a system that implements a number of interfaces.
Example: a set of classes, interfaces, and collaborations.
7. Node - A physical element existing at run time and represents a resource.
Two Types of Behavioral Things
1. Interaction - A behavior made up of a set of messages exchanged among a set of objects in a particular context
to accomplish a specific purpose.
2. State Machine - A behavior that specifies the sequences of states an object or interaction goes through during its'
lifetime in response to events.
One Type of Grouping Thing
1. Package - A general purpose mechanism for organizing elements into groups.
One Type of Annotation Thing
1. Note - A symbol to display comments.
Architecture 10
@2020 Presented by Y.N.D. Aravind
Visualizing, specifying, constructing, and documenting a software-intensive system demands that the
system be viewed from a number of perspectives. Different stakeholders end users, analysts,
developers, system integrators, testers, technical writers, and project managers each bring different
agendas to a project, and each looks at that system in different ways at different times over the project's
life.
Architecture is the set of significant decisions about
 The organization of a software system
 The selection of the structural elements and their interfaces by which the system is composed
 Their behavior, as specified in the collaborations among those elements
 The composition of these structural and behavioral elements into progressively larger subsystems
 The architectural style that guides this organization: the static and dynamic elements and their
interfaces, their collaborations, and their composition
Architecture
11The use case view of a system encompasses
the use cases that describe the behavior of the
system as seen by its end users, analysts, and
testers.
The design view of a system encompasses
the classes, interfaces, and collaborations that
form the vocabulary of the problem and its
solution.
The interaction view of a system shows the
flow of control among its various parts, including
possible concurrency and synchronization
mechanisms.
The implementation view of a system
encompasses the artifacts that are used to
assemble and release the physical system.
The deployment view of a system
encompasses the nodes that form the system's
hardware topology on which the system
executes. @2020 Presented by Y.N.D. Aravind
Classes 12
@2020 Presented by Y.N.D. Aravind
A class is a description of a set of objects that share the same attributes, operations, relationships, and
semantics.
 A class implements one or more interfaces.
 The UML provides a graphical representation of class
Classes cont...
@2020 PRESENTED BY Y.N.D. ARAVIND
13
Names
• Every class must have a name that distinguishes it from other classes.
• A name is a textual string that name alone is known as a simple name;
• a path name is the class name prefixed by the name of the package in which that class lives.
Attributes
 An attribute is a named property of a class that describes a range of values that instances of the property may hold.
 A class may have any number of attributes or no attributes at all.
 An attribute represents some property of thing you are modeling that is shared by all objects of that class
 You can further specify an attribute by stating its class and possibly a default initial value
Classes Cont....
@2020 PRESENTED BY Y.N.D. ARAVIND
14Operations
 An operation is the implementation of a service that
can be requested from any object of the class to
affect behavior.
 A class may have any number of operations or no
operations at all
 Graphically, operations are listed in a compartment
just below the class attributes
 You can specify an operation by stating its signature,
covering the name, type, and default value of all
parameters and a return type
Organizing Attributes and Operations
To better organize long lists of attributes and operations, you
can also prefix each group with a descriptive category by
using stereotypes
Classes Cont....
@2020 PRESENTED BY Y.N.D. ARAVIND
15
Responsibilities
• A Responsibility is a contract or an obligation of a class
• When you model classes, a good starting point is to specify the responsibilities of the things in your
vocabulary.
• A class may have any number of responsibilities, although, in practice, every
• well-structured class has at least one responsibility and at most just a handful.
• Graphically, responsibilities can be drawn in a separate compartment at the bottom of the class
icon
Common Modeling Techniques
Modeling the Vocabulary of a System
• You'll use classes most commonly to model abstractions that are drawn from the problem you are trying to solve or from the
technology you are using to implement a solution to that problem.
• They represent the things that are important to users and to implementers
• To model the vocabulary of a system
 Identify those things that users or implementers use to describe the problem or solution.
 Use CRC cards and use case-based analysis to help find these abstractions.
 For each abstraction, identify a set of responsibilities.
 Provide the attributes and operations that are needed to carry out these responsibilities for each class.
Classes Cont....
@2020 PRESENTED BY Y.N.D. ARAVIND
16Modeling the Distribution of Responsibilities in a System
 abstractions provide a balanced set of responsibilities.
 To model the distribution of responsibilities in a system
Identify a set of classes that work together closely to carry out some behavior.
Identify a set of responsibilities for each of these classes.
Split classes that have too many responsibilities into smaller abstractions, collapse tiny classes that have trivial responsibilities
into larger ones, and reallocate responsibilities so that each abstraction reasonably stands on its own.
Consider the ways in which those classes collaborate with one another,and redistribute their responsibilities accordingly so
that no class within a collaboration does too much or too little.
Modeling Non-software Things
 Sometimes, the things you model may never have an analog in software
 Your application might not have any software that represents them
 To model non-software things
 Model the thing you are abstracting as a class.
 defined building blocks, create a new building block,give a distinctive visual cue.
 consider modeling it as a kind of node, as well, so that you can further expand on its structure.
Modeling Primitive Types
 the things you model may be drawn directly from the programming language you are using to implement a solution.
 these abstractions involve primitive types, such as integers, characters, strings, and even enumeration types
 Model the thing you are abstracting as a type or an enumeration
 If you need to specify the range of values associated with this type, use constraints.
Relationships 17
@2020 Presented by Y.N.D. Aravind
In the UML, the ways that things can connect to one another, either logically or
physically, are modeled as relationships.
Graphically, a relationship is rendered as a path, with different kinds of lines used to
distinguish the kinds of relationships
In object-oriented modeling, there are three kinds of relationships that are most
important:
 Dependencies
 Generalizations
 Associations
 Realization
Relationships 18
@2020 Presented by Y.N.D. Aravind
First, a dependency is a semantic relationship between two model elements in which a
change to one element (the independent one) may affect the semantics of the other
element (the dependent one).
Second, an association is a structural relationship among classes that describes a set of
links, a link being a connection among objects that are instances of the classes.
Third, a generalization is a specialization/generalization relationship in which the specialized
element (the child) builds on the specification of the generalized element (the parent).
Fourth, a realization is a semantic relationship between classifiers, wherein one classifier
specifies a contract that another classifier guarantees to carry out.
Common Mechanisms in the UML 19
@2020 Presented by Y.N.D. Aravind
The presence of four common mechanisms that apply consistently throughout the language.
1. Specifications
2. Adornments
3. Common divisions
4. Extensibility mechanisms
Specifications The UML is more than just a graphical language. Rather, behind every part of its graphical notation there is a specification that
provides a textual statement of the syntax and semantics of that building block. For example, behind a class icon is a specification that provides the
full set of attributes, operations (including their full signatures), and behaviors that the class embodies;
Adornments Most elements in the UML have a unique and direct graphical notation that provides a visual
representation of the most important aspects of the element. For example, the notation for a class is
intentionally designed to be easy to draw, because classes are the most common element found in
modeling object-oriented systems. The class notation also exposes the most important aspects of a class,
namely its name, attributes, and operations.
A class's specification may include other details, such as whether it is abstract or the visibility of its attributes
and operations. Many of these details can be rendered as graphical or textual adornments to the class's basic
rectangular notation.
Common Mechanisms in the UML....20
@2020 Presented by Y.N.D. Aravind
Common Divisions
In modeling object-oriented systems, the world often gets divided in several ways. First, there is the division of class
and object. A class is an abstraction; an object is one concrete manifestation of that abstraction. In the UML,
we can model classes as well as objects.
Second, there is the separation of interface and implementation. An interface declares a contract, and an
implementation represents one concrete realization of that contract, responsible for faithfully carrying out the
interface's complete semantics.
Third, there is the separation of type and role. The type declares the class of an entity, such as an object, an
attribute, or a parameter. A role describes the meaning of an entity within its context, such as a class, component,
or collaboration. Any entity that forms part of the structure of another entity, such as an attribute, has both
characteristics.
Common Mechanisms in the UML...21
@2020 Presented by Y.N.D. Aravind
Extensibility Mechanisms The UML provides a standard language for writing software blueprints, but it is not possible for one closed language to
ever be sufficient to express all possible nuances of all models across all domains across all time. For this reason, the UML is opened-ended,
making it possible for you to extend the language in controlled ways. The UML's extensibility mechanisms include
 Stereotypes
 Tagged values
 Constraints
A stereotype extends the vocabulary of the UML, allowing you to create new kinds of building blocks that are derived from existing ones but that are
specific to your problem.
A tagged value extends the properties of a UML stereotype, allowing you to create new information in the stereotype's specification.
A constraint extends the semantics of a UML building block, allowing you to add new rules or modify existing ones. For
Thank you
PRESENTED BY
Y. N. D. ARAVIND
M.TECH, DEPT OF CSE
NEWTON’S GROUP OF INSTITUTIONS, MACHERLA
Unified Modeling Language
(UML)
PRESENTED BY
Y. N. D. ARAVIND,
M.TECH, DEPT OF CSE,
NEWTON’S GROUP OF INSTITUTIONS, MACHERLA.
Introduction to UML 24
@2020 Presented by Y.N.D. Aravind
Why do we
Model
Conceptual
Model of UML
Architecture Classes
Relationships
Common
Mechanisms
Class
Diagrams
Object
Diagrams
Class Diagram 25
@2020 Presented by Y.N.D. Aravind
TERMS AND CONCEPTS
A class diagram is a diagram that shows a set of classes, interfaces, and collaborations and their relationships. Graphically, a
class diagram is a collection of vertices and arcs.
Common Properties:
A class diagram is just a special kind of diagram and shares the same common properties as do all other diagrams name and
graphical content that are a projection into a model. What distinguishes a class diagram from other kinds of diagrams is its
particular content.
Contents: Class diagrams commonly contain the following things:
• Classes
• Interfaces
• Collaborations
• Dependency, generalization, and association relationships.
Like all other diagrams, class diagrams may contain notes and constraints.
Class Diagram 26
@2020 Presented by Y.N.D. Aravind
Common Uses : We use class diagrams to model the static design view of a system. This view primarily supports the
functional requirements of a system the services the system should provide to its end users.
When you model the static design view of a system, you'll typically use class diagrams in one of three ways.
1. To model the vocabulary of a system
Modeling the vocabulary of a system involves making a decision about which abstractions are a part of the system under
consideration and which fall outside its boundaries. You use class diagrams to specify these abstractions and their
responsibilities.
2. To model simple collaborations
A collaboration is a society of classes, interfaces, and other elements that work together to provide some cooperative behavior
that's bigger than the sum of all the elements. For example, when we re modeling the semantics of a transaction in a distributed
system, we can't just stare at a single class to understand what's going on. Rather, these semantics are carried out by a set of
classes that work together. We use class diagrams to visualize and specify this set of classes and their relationships.
3. To model a logical database schema
Think of a schema as the blueprint for the conceptual design of a database. In many domains, we want to store persistent
information in a relational database or in an object-oriented database. We can model schemas for these databases using class
diagrams.
COMMON MODELING TECHNIQUES
27Modeling Comment
The most common purpose for which you'll use
notes is to write down free-form observations,
reviews, or explanations
To model a comment,
 Put the comment as text in a note and place it
adjacent to the element to which it refers.
 Remember that you can hide or make visible
the elements of our model as we see fit.
 If our comment is lengthy or involves
something richer than plain text, consider putting
our comment in an external document and
linking or embedding that document in a note
attached to our model.
 As our model evolves, keep those comments
that record significant decisions that cannot be
inferred from the model itself, and unless they
are of historic interest discard the others.
@2020 Presented by Y.N.D. Aravind
28
Modeling New Properties
The basic properties of the UML's building
blocks attributes and operations for classes, the
contents of packages, and so on are generic
enough to address most of the things you'll want
to model. However, if you want to extend the
properties of these basic building blocks, you
need to define stereotypes and tagged values.
To model new properties
 First, make sure there's not already a way to
express what you want by using basic UML.
 If you are convinced there's no other way to
express these semantics, define a stereotype
and add the new properties to the stereotype.
The rules of generalization apply tagged values
defined for one kind of stereotype apply to its
children.
@2020 Presented by Y.N.D. Aravind
29
Modeling New Semantics
When we create a model using the UML, we work
within the rules the UML lays down. That's a good
thing, because it means that we can communicate our
intent without ambiguity to anyone else who knows
how to read the UML. However, if we find ourself
needing to express new semantics about which the
UML is silent or that we need to modify the UML's
rules, then we need to write a constraint.
To model new semantics
 First, make sure there's not already a way to
express what we want by using basic UML.
 If we are convinced there's no other way to express
these semantics, write your new semantics in a
constraint placed near the element to which it refers.
We can show a more explicit relationship by
connecting a constraint to its elements using a
dependency relationship.
 If we need to specify our semantics more precisely
and formally, we write our new semantics using OCL.
@2020 Presented by Y.N.D. Aravind
Object Diagram 30
@2020 Presented by Y.N.D. Aravind
Object diagrams model the instances of things contained in class diagrams. An object diagram shows a set of objects and their
relationships at a point in time.
TERMS AND CONCEPTS
An object diagram is a diagram that shows a set of objects and their relationships at a point in time. Graphically, an object diagram
is a collection of vertices and arcs.
Common Properties
An object diagram is a special kind of diagram and shares the same common properties as all other diagrams that is, a name and
graphical contents that are a projection into a model. What distinguishes an object diagram from all other kinds of diagrams is its
particular content.
Contents
Object diagrams commonly contain
•Objects
•Links
Like all other diagrams, object diagrams may contain notes and constraints.
Object Diagram 31
@2020 Presented by Y.N.D. Aravind
Common Uses
We use object diagrams to model the static design view or static process view of a system just as we do with class diagrams,
but from the perspective of real or prototypical instances. This view primarily supports the functional requirements of a system
that is, the services the system should provide to its end users. Object diagrams let you model static data structures.
When you model the static design view or static process view of a system, we typically use object diagrams in one way:
To model object structures
Modeling object structures involves taking a snapshot of the objects in a system at a given moment in time. An object diagram
represents one static frame in the dynamic story board represented by an interaction diagram. You use object diagrams to
visualize, specify, construct, and document the existence of certain instances in your system, together with their relationships to
one another.
COMMON MODELING TECHNIQUES
32Modeling Object Structutes
Object diagrams are especially useful for modeling
complex data structures.
When we model our system's design view, a set of class
diagrams can be used to completely specify the semantics
of our abstractions and their relationships. With object
diagrams, however, we cannot completely specify the
object structure of our system. For an individual class,
there may be a multitude of possible instances, and for a
set of classes in relationship to one another, there may be
many times more possible configurations of these objects.
Therefore, when we use object diagrams, we can only
meaningfully expose interesting sets of concrete or
prototypical objects.
To model an object structure,
 Identify the mechanism we would like to model. A
mechanism represents some function or behavior of the
part of the system we are modeling that results from the
interaction of a society of classes, interfaces, and other
things.
 Create a collaboration to describe a mechanism.
 For each mechanism, identify the classes, interfaces,
and other elements that participate in this collaboration;
identify the relationships among these things as well.
@2020 Presented by Y.N.D. Aravind
Object Diagram cont.... 33
@2020 Presented by Y.N.D. Aravind
Forward engineering ( the creation of code from a model) an object diagram is theoretically possible but pragmatically of limited value. In an
object-oriented system, instances are things that are created and destroyed by the application during run time. Therefore, you cannot exactly
instantiate these objects from the outside.
Reverse Engineering (the creation of a model from code) an object diagram can be useful. In fact, while you are debugging your system, this is
something that you or your tools will do all the time. For example, if you are chasing down a dangling link, you'll want to literally or mentally draw an
object diagram of the affected objects to see where, at a given moment in time, an object's state or its relationship to other objects is broken.
To reverse engineer an object diagram,
 choose the target you want to reverse engineer. Typically, you'll set your context inside an operation or relative to an instance of one particular class.
 Using a tool or simply walking through a scenario, stop execution at a certain moment in time. Identify the set of interesting objects that collaborate
in that context and render them in an object diagram.
 As necessary to understand their semantics, expose these object's states.
 As necessary to understand their semantics, identify the links that exist among these objects.
 If your diagram ends up overly complicated, prune it by eliminating objects that are not germane to the questions about the scenario you need
answered. If your diagram is too simplistic, expand the neighbors of certain interesting objects and expose each object's state more deeply.
 You will usually have to manually add or label structure that is not explicit in the target code. The missing information supplies the design intent that
is only implicit in the final code.es are just free-form text. In practice, a single responsibility is written as a phrase, a sentence, or (at most) a short
paragraph.
Thank you
PRESENTED BY
Y. N. D. ARAVIND
M.TECH, DEPT OF CSE
NEWTON’S GROUP OF INSTITUTIONS, MACHERLA

More Related Content

What's hot

OMD chapter 2 Class modelling
 OMD  chapter 2 Class modelling OMD  chapter 2 Class modelling
OMD chapter 2 Class modelling
jayashri kolekar
 
Object modeling
Object modelingObject modeling
Object modeling
Anand Grewal
 
Ooad notes
Ooad notesOoad notes
Ooad notes
NancyJP
 
Object Oriented Software Development revision slide
Object Oriented Software Development revision slide Object Oriented Software Development revision slide
Object Oriented Software Development revision slide
fauza jali
 
Object Oriented Programming using C++ Part II
Object Oriented Programming using C++ Part IIObject Oriented Programming using C++ Part II
Object Oriented Programming using C++ Part II
Ajit Nayak
 
Microposts Ontology Construction Via Concept Extraction
Microposts Ontology Construction Via Concept Extraction  Microposts Ontology Construction Via Concept Extraction
Microposts Ontology Construction Via Concept Extraction
dannyijwest
 
Object oriented modeling
Object oriented modelingObject oriented modeling
Object oriented modeling
Pooja Dixit
 
Database Management Systems Tutorial
Database Management Systems TutorialDatabase Management Systems Tutorial
Database Management Systems Tutorial
Sachin MK
 
Lecture#01, object orientation
Lecture#01, object orientationLecture#01, object orientation
Lecture#01, object orientation
babak danyal
 
OOAD - UML - Sequence and Communication Diagrams - Lab
OOAD - UML - Sequence and Communication Diagrams - LabOOAD - UML - Sequence and Communication Diagrams - Lab
OOAD - UML - Sequence and Communication Diagrams - Lab
Victer Paul
 
OOAD - UML - Class and Object Diagrams - Lab
OOAD - UML - Class and Object Diagrams - LabOOAD - UML - Class and Object Diagrams - Lab
OOAD - UML - Class and Object Diagrams - Lab
Victer Paul
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented Design
Sudarsun Santhiappan
 
Object Oriented Principles
Object Oriented PrinciplesObject Oriented Principles
Object Oriented Principles
Emprovise
 
Object oriented modeling and design
Object oriented modeling and designObject oriented modeling and design
Object oriented modeling and design
ATS SBGI MIRAJ
 
Object oriented software engineering concepts
Object oriented software engineering conceptsObject oriented software engineering concepts
Object oriented software engineering concepts
Komal Singh
 
How and when to flatten java classes
How and when to flatten java classesHow and when to flatten java classes
How and when to flatten java classes
ijcseit
 

What's hot (16)

OMD chapter 2 Class modelling
 OMD  chapter 2 Class modelling OMD  chapter 2 Class modelling
OMD chapter 2 Class modelling
 
Object modeling
Object modelingObject modeling
Object modeling
 
Ooad notes
Ooad notesOoad notes
Ooad notes
 
Object Oriented Software Development revision slide
Object Oriented Software Development revision slide Object Oriented Software Development revision slide
Object Oriented Software Development revision slide
 
Object Oriented Programming using C++ Part II
Object Oriented Programming using C++ Part IIObject Oriented Programming using C++ Part II
Object Oriented Programming using C++ Part II
 
Microposts Ontology Construction Via Concept Extraction
Microposts Ontology Construction Via Concept Extraction  Microposts Ontology Construction Via Concept Extraction
Microposts Ontology Construction Via Concept Extraction
 
Object oriented modeling
Object oriented modelingObject oriented modeling
Object oriented modeling
 
Database Management Systems Tutorial
Database Management Systems TutorialDatabase Management Systems Tutorial
Database Management Systems Tutorial
 
Lecture#01, object orientation
Lecture#01, object orientationLecture#01, object orientation
Lecture#01, object orientation
 
OOAD - UML - Sequence and Communication Diagrams - Lab
OOAD - UML - Sequence and Communication Diagrams - LabOOAD - UML - Sequence and Communication Diagrams - Lab
OOAD - UML - Sequence and Communication Diagrams - Lab
 
OOAD - UML - Class and Object Diagrams - Lab
OOAD - UML - Class and Object Diagrams - LabOOAD - UML - Class and Object Diagrams - Lab
OOAD - UML - Class and Object Diagrams - Lab
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented Design
 
Object Oriented Principles
Object Oriented PrinciplesObject Oriented Principles
Object Oriented Principles
 
Object oriented modeling and design
Object oriented modeling and designObject oriented modeling and design
Object oriented modeling and design
 
Object oriented software engineering concepts
Object oriented software engineering conceptsObject oriented software engineering concepts
Object oriented software engineering concepts
 
How and when to flatten java classes
How and when to flatten java classesHow and when to flatten java classes
How and when to flatten java classes
 

Similar to Introduction to UML

Architecture and design
Architecture and designArchitecture and design
Architecture and design
himanshu_airon
 
Ooad lab manual
Ooad  lab manualOoad  lab manual
Ooad lab manual
Praseela R
 
Object-oriented modeling and design.pdf
Object-oriented modeling and  design.pdfObject-oriented modeling and  design.pdf
Object-oriented modeling and design.pdf
SHIVAM691605
 
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
Shri Shankaracharya College, Bhilai,Junwani
 
Object oriented software engineering
Object oriented software engineeringObject oriented software engineering
Object oriented software engineering
Varsha Ajith
 
SMD Unit ii
SMD Unit iiSMD Unit ii
SMD Unit ii
madhavi patil
 
Uml - An Overview
Uml - An OverviewUml - An Overview
Uml - An Overview
Raj Thilak S
 
Oomd unit1
Oomd unit1Oomd unit1
Oomd unit1
VivekChaudhary93
 
Uml
UmlUml
Ooad
OoadOoad
Ooad
gantib
 
Sda 7
Sda   7Sda   7
432
432432
Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...
Prakhyath Rai
 
Ooad 2marks
Ooad 2marksOoad 2marks
Ooad 2marks
Ash Wini
 
Advanced Structural Modeling
Advanced Structural ModelingAdvanced Structural Modeling
Advanced Structural Modeling
AMITJain879
 
uml2-1214558329929112-8.ppt
uml2-1214558329929112-8.pptuml2-1214558329929112-8.ppt
uml2-1214558329929112-8.ppt
AleksandarUrdarevski
 
Introduction to Rational Rose
Introduction to Rational RoseIntroduction to Rational Rose
Introduction to Rational Rose
Munaam Munawar
 
UML and Software Modeling Tools.pptx
UML and Software Modeling Tools.pptxUML and Software Modeling Tools.pptx
UML and Software Modeling Tools.pptx
Nwabueze Obioma
 
Software Engineering Tools and Practices.pdf
Software Engineering Tools and Practices.pdfSoftware Engineering Tools and Practices.pdf
Software Engineering Tools and Practices.pdf
MeagGhn
 
OOAD unit1 introduction to object orientation
 OOAD unit1 introduction to object orientation OOAD unit1 introduction to object orientation
OOAD unit1 introduction to object orientation
Dr Chetan Shelke
 

Similar to Introduction to UML (20)

Architecture and design
Architecture and designArchitecture and design
Architecture and design
 
Ooad lab manual
Ooad  lab manualOoad  lab manual
Ooad lab manual
 
Object-oriented modeling and design.pdf
Object-oriented modeling and  design.pdfObject-oriented modeling and  design.pdf
Object-oriented modeling and design.pdf
 
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
 
Object oriented software engineering
Object oriented software engineeringObject oriented software engineering
Object oriented software engineering
 
SMD Unit ii
SMD Unit iiSMD Unit ii
SMD Unit ii
 
Uml - An Overview
Uml - An OverviewUml - An Overview
Uml - An Overview
 
Oomd unit1
Oomd unit1Oomd unit1
Oomd unit1
 
Uml
UmlUml
Uml
 
Ooad
OoadOoad
Ooad
 
Sda 7
Sda   7Sda   7
Sda 7
 
432
432432
432
 
Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...
 
Ooad 2marks
Ooad 2marksOoad 2marks
Ooad 2marks
 
Advanced Structural Modeling
Advanced Structural ModelingAdvanced Structural Modeling
Advanced Structural Modeling
 
uml2-1214558329929112-8.ppt
uml2-1214558329929112-8.pptuml2-1214558329929112-8.ppt
uml2-1214558329929112-8.ppt
 
Introduction to Rational Rose
Introduction to Rational RoseIntroduction to Rational Rose
Introduction to Rational Rose
 
UML and Software Modeling Tools.pptx
UML and Software Modeling Tools.pptxUML and Software Modeling Tools.pptx
UML and Software Modeling Tools.pptx
 
Software Engineering Tools and Practices.pdf
Software Engineering Tools and Practices.pdfSoftware Engineering Tools and Practices.pdf
Software Engineering Tools and Practices.pdf
 
OOAD unit1 introduction to object orientation
 OOAD unit1 introduction to object orientation OOAD unit1 introduction to object orientation
OOAD unit1 introduction to object orientation
 

More from yndaravind

OOAD
OOADOOAD
FILES IN C
FILES IN CFILES IN C
FILES IN C
yndaravind
 
Repetations in C
Repetations in CRepetations in C
Repetations in C
yndaravind
 
Selection & Making Decisions in c
Selection & Making Decisions in cSelection & Making Decisions in c
Selection & Making Decisions in c
yndaravind
 
Bitwise Operators in C
Bitwise Operators in CBitwise Operators in C
Bitwise Operators in C
yndaravind
 
Structure In C
Structure In CStructure In C
Structure In C
yndaravind
 
Strings part2
Strings part2Strings part2
Strings part2
yndaravind
 
Arrays In C
Arrays In CArrays In C
Arrays In C
yndaravind
 
Strings IN C
Strings IN CStrings IN C
Strings IN C
yndaravind
 
Fnctions part2
Fnctions part2Fnctions part2
Fnctions part2
yndaravind
 
Functions part1
Functions part1Functions part1
Functions part1
yndaravind
 

More from yndaravind (11)

OOAD
OOADOOAD
OOAD
 
FILES IN C
FILES IN CFILES IN C
FILES IN C
 
Repetations in C
Repetations in CRepetations in C
Repetations in C
 
Selection & Making Decisions in c
Selection & Making Decisions in cSelection & Making Decisions in c
Selection & Making Decisions in c
 
Bitwise Operators in C
Bitwise Operators in CBitwise Operators in C
Bitwise Operators in C
 
Structure In C
Structure In CStructure In C
Structure In C
 
Strings part2
Strings part2Strings part2
Strings part2
 
Arrays In C
Arrays In CArrays In C
Arrays In C
 
Strings IN C
Strings IN CStrings IN C
Strings IN C
 
Fnctions part2
Fnctions part2Fnctions part2
Fnctions part2
 
Functions part1
Functions part1Functions part1
Functions part1
 

Recently uploaded

Brand Guideline of Bashundhara A4 Paper - 2024
Brand Guideline of Bashundhara A4 Paper - 2024Brand Guideline of Bashundhara A4 Paper - 2024
Brand Guideline of Bashundhara A4 Paper - 2024
khabri85
 
The basics of sentences session 8pptx.pptx
The basics of sentences session 8pptx.pptxThe basics of sentences session 8pptx.pptx
The basics of sentences session 8pptx.pptx
heathfieldcps1
 
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptx
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptxCapTechTalks Webinar Slides June 2024 Donovan Wright.pptx
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptx
CapitolTechU
 
8+8+8 Rule Of Time Management For Better Productivity
8+8+8 Rule Of Time Management For Better Productivity8+8+8 Rule Of Time Management For Better Productivity
8+8+8 Rule Of Time Management For Better Productivity
RuchiRathor2
 
IoT (Internet of Things) introduction Notes.pdf
IoT (Internet of Things) introduction Notes.pdfIoT (Internet of Things) introduction Notes.pdf
IoT (Internet of Things) introduction Notes.pdf
roshanranjit222
 
Talking Tech through Compelling Visual Aids
Talking Tech through Compelling Visual AidsTalking Tech through Compelling Visual Aids
Talking Tech through Compelling Visual Aids
MattVassar1
 
220711130088 Sumi Basak Virtual University EPC 3.pptx
220711130088 Sumi Basak Virtual University EPC 3.pptx220711130088 Sumi Basak Virtual University EPC 3.pptx
220711130088 Sumi Basak Virtual University EPC 3.pptx
Kalna College
 
bryophytes.pptx bsc botany honours second semester
bryophytes.pptx bsc botany honours  second semesterbryophytes.pptx bsc botany honours  second semester
bryophytes.pptx bsc botany honours second semester
Sarojini38
 
How to stay relevant as a cyber professional: Skills, trends and career paths...
How to stay relevant as a cyber professional: Skills, trends and career paths...How to stay relevant as a cyber professional: Skills, trends and career paths...
How to stay relevant as a cyber professional: Skills, trends and career paths...
Infosec
 
Decolonizing Universal Design for Learning
Decolonizing Universal Design for LearningDecolonizing Universal Design for Learning
Decolonizing Universal Design for Learning
Frederic Fovet
 
Observational Learning
Observational Learning Observational Learning
Observational Learning
sanamushtaq922
 
220711130082 Srabanti Bag Internet Resources For Natural Science
220711130082 Srabanti Bag Internet Resources For Natural Science220711130082 Srabanti Bag Internet Resources For Natural Science
220711130082 Srabanti Bag Internet Resources For Natural Science
Kalna College
 
(T.L.E.) Agriculture: "Ornamental Plants"
(T.L.E.) Agriculture: "Ornamental Plants"(T.L.E.) Agriculture: "Ornamental Plants"
(T.L.E.) Agriculture: "Ornamental Plants"
MJDuyan
 
220711130083 SUBHASHREE RAKSHIT Internet resources for social science
220711130083 SUBHASHREE RAKSHIT  Internet resources for social science220711130083 SUBHASHREE RAKSHIT  Internet resources for social science
220711130083 SUBHASHREE RAKSHIT Internet resources for social science
Kalna College
 
Opportunity scholarships and the schools that receive them
Opportunity scholarships and the schools that receive themOpportunity scholarships and the schools that receive them
Opportunity scholarships and the schools that receive them
EducationNC
 
nutrition in plants chapter 1 class 7...
nutrition in plants chapter 1 class 7...nutrition in plants chapter 1 class 7...
nutrition in plants chapter 1 class 7...
chaudharyreet2244
 
Creativity for Innovation and Speechmaking
Creativity for Innovation and SpeechmakingCreativity for Innovation and Speechmaking
Creativity for Innovation and Speechmaking
MattVassar1
 
Science-9-Lesson-1-The Bohr Model-NLC.pptx pptx
Science-9-Lesson-1-The Bohr Model-NLC.pptx pptxScience-9-Lesson-1-The Bohr Model-NLC.pptx pptx
Science-9-Lesson-1-The Bohr Model-NLC.pptx pptx
Catherine Dela Cruz
 
Interprofessional Education Platform Introduction.pdf
Interprofessional Education Platform Introduction.pdfInterprofessional Education Platform Introduction.pdf
Interprofessional Education Platform Introduction.pdf
Ben Aldrich
 
How to Create a Stage or a Pipeline in Odoo 17 CRM
How to Create a Stage or a Pipeline in Odoo 17 CRMHow to Create a Stage or a Pipeline in Odoo 17 CRM
How to Create a Stage or a Pipeline in Odoo 17 CRM
Celine George
 

Recently uploaded (20)

Brand Guideline of Bashundhara A4 Paper - 2024
Brand Guideline of Bashundhara A4 Paper - 2024Brand Guideline of Bashundhara A4 Paper - 2024
Brand Guideline of Bashundhara A4 Paper - 2024
 
The basics of sentences session 8pptx.pptx
The basics of sentences session 8pptx.pptxThe basics of sentences session 8pptx.pptx
The basics of sentences session 8pptx.pptx
 
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptx
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptxCapTechTalks Webinar Slides June 2024 Donovan Wright.pptx
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptx
 
8+8+8 Rule Of Time Management For Better Productivity
8+8+8 Rule Of Time Management For Better Productivity8+8+8 Rule Of Time Management For Better Productivity
8+8+8 Rule Of Time Management For Better Productivity
 
IoT (Internet of Things) introduction Notes.pdf
IoT (Internet of Things) introduction Notes.pdfIoT (Internet of Things) introduction Notes.pdf
IoT (Internet of Things) introduction Notes.pdf
 
Talking Tech through Compelling Visual Aids
Talking Tech through Compelling Visual AidsTalking Tech through Compelling Visual Aids
Talking Tech through Compelling Visual Aids
 
220711130088 Sumi Basak Virtual University EPC 3.pptx
220711130088 Sumi Basak Virtual University EPC 3.pptx220711130088 Sumi Basak Virtual University EPC 3.pptx
220711130088 Sumi Basak Virtual University EPC 3.pptx
 
bryophytes.pptx bsc botany honours second semester
bryophytes.pptx bsc botany honours  second semesterbryophytes.pptx bsc botany honours  second semester
bryophytes.pptx bsc botany honours second semester
 
How to stay relevant as a cyber professional: Skills, trends and career paths...
How to stay relevant as a cyber professional: Skills, trends and career paths...How to stay relevant as a cyber professional: Skills, trends and career paths...
How to stay relevant as a cyber professional: Skills, trends and career paths...
 
Decolonizing Universal Design for Learning
Decolonizing Universal Design for LearningDecolonizing Universal Design for Learning
Decolonizing Universal Design for Learning
 
Observational Learning
Observational Learning Observational Learning
Observational Learning
 
220711130082 Srabanti Bag Internet Resources For Natural Science
220711130082 Srabanti Bag Internet Resources For Natural Science220711130082 Srabanti Bag Internet Resources For Natural Science
220711130082 Srabanti Bag Internet Resources For Natural Science
 
(T.L.E.) Agriculture: "Ornamental Plants"
(T.L.E.) Agriculture: "Ornamental Plants"(T.L.E.) Agriculture: "Ornamental Plants"
(T.L.E.) Agriculture: "Ornamental Plants"
 
220711130083 SUBHASHREE RAKSHIT Internet resources for social science
220711130083 SUBHASHREE RAKSHIT  Internet resources for social science220711130083 SUBHASHREE RAKSHIT  Internet resources for social science
220711130083 SUBHASHREE RAKSHIT Internet resources for social science
 
Opportunity scholarships and the schools that receive them
Opportunity scholarships and the schools that receive themOpportunity scholarships and the schools that receive them
Opportunity scholarships and the schools that receive them
 
nutrition in plants chapter 1 class 7...
nutrition in plants chapter 1 class 7...nutrition in plants chapter 1 class 7...
nutrition in plants chapter 1 class 7...
 
Creativity for Innovation and Speechmaking
Creativity for Innovation and SpeechmakingCreativity for Innovation and Speechmaking
Creativity for Innovation and Speechmaking
 
Science-9-Lesson-1-The Bohr Model-NLC.pptx pptx
Science-9-Lesson-1-The Bohr Model-NLC.pptx pptxScience-9-Lesson-1-The Bohr Model-NLC.pptx pptx
Science-9-Lesson-1-The Bohr Model-NLC.pptx pptx
 
Interprofessional Education Platform Introduction.pdf
Interprofessional Education Platform Introduction.pdfInterprofessional Education Platform Introduction.pdf
Interprofessional Education Platform Introduction.pdf
 
How to Create a Stage or a Pipeline in Odoo 17 CRM
How to Create a Stage or a Pipeline in Odoo 17 CRMHow to Create a Stage or a Pipeline in Odoo 17 CRM
How to Create a Stage or a Pipeline in Odoo 17 CRM
 

Introduction to UML

  • 1. Unified Modeling Language (UML) PRESENTED BY Y. N. D. ARAVIND, M.TECH, DEPT OF CSE, NEWTON’S GROUP OF INSTITUTIONS, MACHERLA.
  • 2. Introduction to UML 2 @2020 Presented by Y.N.D. Aravind Why do we Model Conceptual Model of UML Architecture Classes Relationships Common Mechanisms Class Diagrams Object Diagrams
  • 3. A Brief History 3 @2020 Presented by Y.N.D. Aravind
  • 4. A Brief History 4 @2020 Presented by Y.N.D. Aravind
  • 5. Why do we Model ? 5 @2020 Presented by Y.N.D. Aravind 1. Importance of Modeling: Why do we model? A model is a simplification at some level of abstraction We build models to better understand the systems we are developing.  To help us visualize  To specify structure or behavior  To provide template for building system  To document decisions we have made 2. Principles of Modeling: The models we choose have a profound influence on the solution we provide Every model may be expressed at different levels of abstraction The best models are connected to reality No single model is sufficient, a set of models is needed to solve any nontrivial system UML is a visual modeling language “A picture is worth a thousand words.” - old saying Unified Modeling Language: “A language provides a vocabulary and the rules for combining words [...] for the purpose of communication.
  • 6. Why do we Model ? 6 @2020 Presented by Y.N.D. Aravind 3. Object Oriented Modeling: In software, there are several ways to approach a model. The two most common ways are 1. Algorithmic perspective 2. Object-oriented perspective 4. Unified Modeling Language(UML) The Unified Modeling Language is a standard language for writing software blueprints. The UML may be used to visualize, specify, construct, and document the artifacts of a software-intensive system. The UML is appropriate for modeling systems ranging from enterprise information systems to distributed Web-based applications and even to hard real time embedded systems. It is a very expressive language, addressing all the views needed to develop and then deploy such systems. The UML is a language for  Visualizing  Specifying  Constructing  Documenting
  • 7. Conceptual Model of UML 7 @2020 Presented by Y.N.D. Aravind To understand the UML, you need to form a conceptual model of the language, and this requires learning three major elements: 1. Things 2. Relationships 3. Diagrams
  • 8. Building Blocks of the UML 8 Things RELATIONSHIPS DIAGRAMS 1. Structural things 2. Behavioral things 3. Grouping things 4. Annotational things 1. Dependency 2. Association 3. Generalization 4. Realization 1. Class diagram 2. Object diagram 3. Component diagram 4. Composite structure diagram 5. Use case diagram 6. Sequence diagram 7. Communication diagram 8. State diagram 9. Activity diagram 10. Deployment diagram 11. Package diagram 12. Timing diagram 13. Interaction overview diagram
  • 9. Building Blocks of the UML 9Seven Types of Structural Things 1. Class - An object with defined attributes and operations. A class in UML is very much like a class in C++. 2. Interface - A collection of functions that specify a service of a class or component, i.e. externally visible behavior of that class. 3. Collaboration - A larger pattern of behaviors and actions. Example: All classes and behaviors that create the modeling of a moving tank in a simulation. 4. Use Case - A sequence of actions that a system performs that yields an observable result. Used to structure behavior in a model. Is realized by a collaboration. 5. Active Class - Like a class but its represents behavior that runs concurrent with other behaviors, i.e. threading. 6. Component - A physical and replaceable part of a system that implements a number of interfaces. Example: a set of classes, interfaces, and collaborations. 7. Node - A physical element existing at run time and represents a resource. Two Types of Behavioral Things 1. Interaction - A behavior made up of a set of messages exchanged among a set of objects in a particular context to accomplish a specific purpose. 2. State Machine - A behavior that specifies the sequences of states an object or interaction goes through during its' lifetime in response to events. One Type of Grouping Thing 1. Package - A general purpose mechanism for organizing elements into groups. One Type of Annotation Thing 1. Note - A symbol to display comments.
  • 10. Architecture 10 @2020 Presented by Y.N.D. Aravind Visualizing, specifying, constructing, and documenting a software-intensive system demands that the system be viewed from a number of perspectives. Different stakeholders end users, analysts, developers, system integrators, testers, technical writers, and project managers each bring different agendas to a project, and each looks at that system in different ways at different times over the project's life. Architecture is the set of significant decisions about  The organization of a software system  The selection of the structural elements and their interfaces by which the system is composed  Their behavior, as specified in the collaborations among those elements  The composition of these structural and behavioral elements into progressively larger subsystems  The architectural style that guides this organization: the static and dynamic elements and their interfaces, their collaborations, and their composition
  • 11. Architecture 11The use case view of a system encompasses the use cases that describe the behavior of the system as seen by its end users, analysts, and testers. The design view of a system encompasses the classes, interfaces, and collaborations that form the vocabulary of the problem and its solution. The interaction view of a system shows the flow of control among its various parts, including possible concurrency and synchronization mechanisms. The implementation view of a system encompasses the artifacts that are used to assemble and release the physical system. The deployment view of a system encompasses the nodes that form the system's hardware topology on which the system executes. @2020 Presented by Y.N.D. Aravind
  • 12. Classes 12 @2020 Presented by Y.N.D. Aravind A class is a description of a set of objects that share the same attributes, operations, relationships, and semantics.  A class implements one or more interfaces.  The UML provides a graphical representation of class
  • 13. Classes cont... @2020 PRESENTED BY Y.N.D. ARAVIND 13 Names • Every class must have a name that distinguishes it from other classes. • A name is a textual string that name alone is known as a simple name; • a path name is the class name prefixed by the name of the package in which that class lives. Attributes  An attribute is a named property of a class that describes a range of values that instances of the property may hold.  A class may have any number of attributes or no attributes at all.  An attribute represents some property of thing you are modeling that is shared by all objects of that class  You can further specify an attribute by stating its class and possibly a default initial value
  • 14. Classes Cont.... @2020 PRESENTED BY Y.N.D. ARAVIND 14Operations  An operation is the implementation of a service that can be requested from any object of the class to affect behavior.  A class may have any number of operations or no operations at all  Graphically, operations are listed in a compartment just below the class attributes  You can specify an operation by stating its signature, covering the name, type, and default value of all parameters and a return type Organizing Attributes and Operations To better organize long lists of attributes and operations, you can also prefix each group with a descriptive category by using stereotypes
  • 15. Classes Cont.... @2020 PRESENTED BY Y.N.D. ARAVIND 15 Responsibilities • A Responsibility is a contract or an obligation of a class • When you model classes, a good starting point is to specify the responsibilities of the things in your vocabulary. • A class may have any number of responsibilities, although, in practice, every • well-structured class has at least one responsibility and at most just a handful. • Graphically, responsibilities can be drawn in a separate compartment at the bottom of the class icon Common Modeling Techniques Modeling the Vocabulary of a System • You'll use classes most commonly to model abstractions that are drawn from the problem you are trying to solve or from the technology you are using to implement a solution to that problem. • They represent the things that are important to users and to implementers • To model the vocabulary of a system  Identify those things that users or implementers use to describe the problem or solution.  Use CRC cards and use case-based analysis to help find these abstractions.  For each abstraction, identify a set of responsibilities.  Provide the attributes and operations that are needed to carry out these responsibilities for each class.
  • 16. Classes Cont.... @2020 PRESENTED BY Y.N.D. ARAVIND 16Modeling the Distribution of Responsibilities in a System  abstractions provide a balanced set of responsibilities.  To model the distribution of responsibilities in a system Identify a set of classes that work together closely to carry out some behavior. Identify a set of responsibilities for each of these classes. Split classes that have too many responsibilities into smaller abstractions, collapse tiny classes that have trivial responsibilities into larger ones, and reallocate responsibilities so that each abstraction reasonably stands on its own. Consider the ways in which those classes collaborate with one another,and redistribute their responsibilities accordingly so that no class within a collaboration does too much or too little. Modeling Non-software Things  Sometimes, the things you model may never have an analog in software  Your application might not have any software that represents them  To model non-software things  Model the thing you are abstracting as a class.  defined building blocks, create a new building block,give a distinctive visual cue.  consider modeling it as a kind of node, as well, so that you can further expand on its structure. Modeling Primitive Types  the things you model may be drawn directly from the programming language you are using to implement a solution.  these abstractions involve primitive types, such as integers, characters, strings, and even enumeration types  Model the thing you are abstracting as a type or an enumeration  If you need to specify the range of values associated with this type, use constraints.
  • 17. Relationships 17 @2020 Presented by Y.N.D. Aravind In the UML, the ways that things can connect to one another, either logically or physically, are modeled as relationships. Graphically, a relationship is rendered as a path, with different kinds of lines used to distinguish the kinds of relationships In object-oriented modeling, there are three kinds of relationships that are most important:  Dependencies  Generalizations  Associations  Realization
  • 18. Relationships 18 @2020 Presented by Y.N.D. Aravind First, a dependency is a semantic relationship between two model elements in which a change to one element (the independent one) may affect the semantics of the other element (the dependent one). Second, an association is a structural relationship among classes that describes a set of links, a link being a connection among objects that are instances of the classes. Third, a generalization is a specialization/generalization relationship in which the specialized element (the child) builds on the specification of the generalized element (the parent). Fourth, a realization is a semantic relationship between classifiers, wherein one classifier specifies a contract that another classifier guarantees to carry out.
  • 19. Common Mechanisms in the UML 19 @2020 Presented by Y.N.D. Aravind The presence of four common mechanisms that apply consistently throughout the language. 1. Specifications 2. Adornments 3. Common divisions 4. Extensibility mechanisms Specifications The UML is more than just a graphical language. Rather, behind every part of its graphical notation there is a specification that provides a textual statement of the syntax and semantics of that building block. For example, behind a class icon is a specification that provides the full set of attributes, operations (including their full signatures), and behaviors that the class embodies; Adornments Most elements in the UML have a unique and direct graphical notation that provides a visual representation of the most important aspects of the element. For example, the notation for a class is intentionally designed to be easy to draw, because classes are the most common element found in modeling object-oriented systems. The class notation also exposes the most important aspects of a class, namely its name, attributes, and operations. A class's specification may include other details, such as whether it is abstract or the visibility of its attributes and operations. Many of these details can be rendered as graphical or textual adornments to the class's basic rectangular notation.
  • 20. Common Mechanisms in the UML....20 @2020 Presented by Y.N.D. Aravind Common Divisions In modeling object-oriented systems, the world often gets divided in several ways. First, there is the division of class and object. A class is an abstraction; an object is one concrete manifestation of that abstraction. In the UML, we can model classes as well as objects. Second, there is the separation of interface and implementation. An interface declares a contract, and an implementation represents one concrete realization of that contract, responsible for faithfully carrying out the interface's complete semantics. Third, there is the separation of type and role. The type declares the class of an entity, such as an object, an attribute, or a parameter. A role describes the meaning of an entity within its context, such as a class, component, or collaboration. Any entity that forms part of the structure of another entity, such as an attribute, has both characteristics.
  • 21. Common Mechanisms in the UML...21 @2020 Presented by Y.N.D. Aravind Extensibility Mechanisms The UML provides a standard language for writing software blueprints, but it is not possible for one closed language to ever be sufficient to express all possible nuances of all models across all domains across all time. For this reason, the UML is opened-ended, making it possible for you to extend the language in controlled ways. The UML's extensibility mechanisms include  Stereotypes  Tagged values  Constraints A stereotype extends the vocabulary of the UML, allowing you to create new kinds of building blocks that are derived from existing ones but that are specific to your problem. A tagged value extends the properties of a UML stereotype, allowing you to create new information in the stereotype's specification. A constraint extends the semantics of a UML building block, allowing you to add new rules or modify existing ones. For
  • 22. Thank you PRESENTED BY Y. N. D. ARAVIND M.TECH, DEPT OF CSE NEWTON’S GROUP OF INSTITUTIONS, MACHERLA
  • 23. Unified Modeling Language (UML) PRESENTED BY Y. N. D. ARAVIND, M.TECH, DEPT OF CSE, NEWTON’S GROUP OF INSTITUTIONS, MACHERLA.
  • 24. Introduction to UML 24 @2020 Presented by Y.N.D. Aravind Why do we Model Conceptual Model of UML Architecture Classes Relationships Common Mechanisms Class Diagrams Object Diagrams
  • 25. Class Diagram 25 @2020 Presented by Y.N.D. Aravind TERMS AND CONCEPTS A class diagram is a diagram that shows a set of classes, interfaces, and collaborations and their relationships. Graphically, a class diagram is a collection of vertices and arcs. Common Properties: A class diagram is just a special kind of diagram and shares the same common properties as do all other diagrams name and graphical content that are a projection into a model. What distinguishes a class diagram from other kinds of diagrams is its particular content. Contents: Class diagrams commonly contain the following things: • Classes • Interfaces • Collaborations • Dependency, generalization, and association relationships. Like all other diagrams, class diagrams may contain notes and constraints.
  • 26. Class Diagram 26 @2020 Presented by Y.N.D. Aravind Common Uses : We use class diagrams to model the static design view of a system. This view primarily supports the functional requirements of a system the services the system should provide to its end users. When you model the static design view of a system, you'll typically use class diagrams in one of three ways. 1. To model the vocabulary of a system Modeling the vocabulary of a system involves making a decision about which abstractions are a part of the system under consideration and which fall outside its boundaries. You use class diagrams to specify these abstractions and their responsibilities. 2. To model simple collaborations A collaboration is a society of classes, interfaces, and other elements that work together to provide some cooperative behavior that's bigger than the sum of all the elements. For example, when we re modeling the semantics of a transaction in a distributed system, we can't just stare at a single class to understand what's going on. Rather, these semantics are carried out by a set of classes that work together. We use class diagrams to visualize and specify this set of classes and their relationships. 3. To model a logical database schema Think of a schema as the blueprint for the conceptual design of a database. In many domains, we want to store persistent information in a relational database or in an object-oriented database. We can model schemas for these databases using class diagrams.
  • 27. COMMON MODELING TECHNIQUES 27Modeling Comment The most common purpose for which you'll use notes is to write down free-form observations, reviews, or explanations To model a comment,  Put the comment as text in a note and place it adjacent to the element to which it refers.  Remember that you can hide or make visible the elements of our model as we see fit.  If our comment is lengthy or involves something richer than plain text, consider putting our comment in an external document and linking or embedding that document in a note attached to our model.  As our model evolves, keep those comments that record significant decisions that cannot be inferred from the model itself, and unless they are of historic interest discard the others. @2020 Presented by Y.N.D. Aravind
  • 28. 28 Modeling New Properties The basic properties of the UML's building blocks attributes and operations for classes, the contents of packages, and so on are generic enough to address most of the things you'll want to model. However, if you want to extend the properties of these basic building blocks, you need to define stereotypes and tagged values. To model new properties  First, make sure there's not already a way to express what you want by using basic UML.  If you are convinced there's no other way to express these semantics, define a stereotype and add the new properties to the stereotype. The rules of generalization apply tagged values defined for one kind of stereotype apply to its children. @2020 Presented by Y.N.D. Aravind
  • 29. 29 Modeling New Semantics When we create a model using the UML, we work within the rules the UML lays down. That's a good thing, because it means that we can communicate our intent without ambiguity to anyone else who knows how to read the UML. However, if we find ourself needing to express new semantics about which the UML is silent or that we need to modify the UML's rules, then we need to write a constraint. To model new semantics  First, make sure there's not already a way to express what we want by using basic UML.  If we are convinced there's no other way to express these semantics, write your new semantics in a constraint placed near the element to which it refers. We can show a more explicit relationship by connecting a constraint to its elements using a dependency relationship.  If we need to specify our semantics more precisely and formally, we write our new semantics using OCL. @2020 Presented by Y.N.D. Aravind
  • 30. Object Diagram 30 @2020 Presented by Y.N.D. Aravind Object diagrams model the instances of things contained in class diagrams. An object diagram shows a set of objects and their relationships at a point in time. TERMS AND CONCEPTS An object diagram is a diagram that shows a set of objects and their relationships at a point in time. Graphically, an object diagram is a collection of vertices and arcs. Common Properties An object diagram is a special kind of diagram and shares the same common properties as all other diagrams that is, a name and graphical contents that are a projection into a model. What distinguishes an object diagram from all other kinds of diagrams is its particular content. Contents Object diagrams commonly contain •Objects •Links Like all other diagrams, object diagrams may contain notes and constraints.
  • 31. Object Diagram 31 @2020 Presented by Y.N.D. Aravind Common Uses We use object diagrams to model the static design view or static process view of a system just as we do with class diagrams, but from the perspective of real or prototypical instances. This view primarily supports the functional requirements of a system that is, the services the system should provide to its end users. Object diagrams let you model static data structures. When you model the static design view or static process view of a system, we typically use object diagrams in one way: To model object structures Modeling object structures involves taking a snapshot of the objects in a system at a given moment in time. An object diagram represents one static frame in the dynamic story board represented by an interaction diagram. You use object diagrams to visualize, specify, construct, and document the existence of certain instances in your system, together with their relationships to one another.
  • 32. COMMON MODELING TECHNIQUES 32Modeling Object Structutes Object diagrams are especially useful for modeling complex data structures. When we model our system's design view, a set of class diagrams can be used to completely specify the semantics of our abstractions and their relationships. With object diagrams, however, we cannot completely specify the object structure of our system. For an individual class, there may be a multitude of possible instances, and for a set of classes in relationship to one another, there may be many times more possible configurations of these objects. Therefore, when we use object diagrams, we can only meaningfully expose interesting sets of concrete or prototypical objects. To model an object structure,  Identify the mechanism we would like to model. A mechanism represents some function or behavior of the part of the system we are modeling that results from the interaction of a society of classes, interfaces, and other things.  Create a collaboration to describe a mechanism.  For each mechanism, identify the classes, interfaces, and other elements that participate in this collaboration; identify the relationships among these things as well. @2020 Presented by Y.N.D. Aravind
  • 33. Object Diagram cont.... 33 @2020 Presented by Y.N.D. Aravind Forward engineering ( the creation of code from a model) an object diagram is theoretically possible but pragmatically of limited value. In an object-oriented system, instances are things that are created and destroyed by the application during run time. Therefore, you cannot exactly instantiate these objects from the outside. Reverse Engineering (the creation of a model from code) an object diagram can be useful. In fact, while you are debugging your system, this is something that you or your tools will do all the time. For example, if you are chasing down a dangling link, you'll want to literally or mentally draw an object diagram of the affected objects to see where, at a given moment in time, an object's state or its relationship to other objects is broken. To reverse engineer an object diagram,  choose the target you want to reverse engineer. Typically, you'll set your context inside an operation or relative to an instance of one particular class.  Using a tool or simply walking through a scenario, stop execution at a certain moment in time. Identify the set of interesting objects that collaborate in that context and render them in an object diagram.  As necessary to understand their semantics, expose these object's states.  As necessary to understand their semantics, identify the links that exist among these objects.  If your diagram ends up overly complicated, prune it by eliminating objects that are not germane to the questions about the scenario you need answered. If your diagram is too simplistic, expand the neighbors of certain interesting objects and expose each object's state more deeply.  You will usually have to manually add or label structure that is not explicit in the target code. The missing information supplies the design intent that is only implicit in the final code.es are just free-form text. In practice, a single responsibility is written as a phrase, a sentence, or (at most) a short paragraph.
  • 34. Thank you PRESENTED BY Y. N. D. ARAVIND M.TECH, DEPT OF CSE NEWTON’S GROUP OF INSTITUTIONS, MACHERLA
  翻译: