OBJECT ORIENTED ANALYSIS AND DESIGN
(Professional Elective-II) 201CS6E03
UNIT-1
INTRODUCTION TO UML
ADITYA ENGINEERING COLLEGE (A)
2/9/2024 Dr K Swaroopa OOAD
1
OBJECT ORIENTED ANALYSIS AND DESIGN
TOPIC : CONCEPTUAL MODEL OF UML
CO1 : ILLUSTRATE SOFTWARE DESIGN WITH UML DIAGRAMS
2/9/2024
Dr K Swaroopa
OOAD
ADITYA ENGINEERING COLLEGE (A)
Unified Modeling Language (UML)…
• It helps to specify, construct, visualize and document the artifacts of
an object-oriented system. It is used to depict the structures and the
relationships in a complex system.
• UML was created by the Object Management Group (OMG) and
UML 1.0 specification draft was proposed to the OMG in January
1997.
• UML was initially started to capture the behavior of complex
software and non-software system.
ADITYA ENGINEERING COLLEGE (A)
2/9/2024
Dr K Swaroopa
OOAD
Unified Modeling Language (UML)…
• UML is different from the other common programming languages such as C++,
Java, COBOL, etc.
• UML is a pictorial language used to make software blueprints.
• UML can be described as a general purpose visual modeling language to
visualize, specify, construct, and document software system.
• UML is generally used to model software systems, it is not limited within this
boundary. It is also used to model non-software systems as well.
• For example, the process flow in a manufacturing unit, etc.
• Goal of UML : as a simple modeling mechanism to model all possible practical
systems in today’s complex environment.
2/9/2024
Dr K Swaroopa
OOAD
ADITYA ENGINEERING COLLEGE (A)
Aditya Engineering College (A)
UML & DP UNIT-I
UML Pioneers
2/9/2024
Dr K Swaroopa
OOAD
Aditya Engineering College (A)
UML & DP UNIT-I
Grady Booch has defined OOA as, “Object-oriented
analysis is a method of analysis that examines
requirements from the perspective of the classes and
objects found in the vocabulary of the problem
domain”.
The primary tasks in object-oriented analysis (OOA) are
2/9/2024
Dr K Swaroopa
OOAD
Aditya Engineering College (A)
UML & DP UNIT-I
• Identifying objects
• Organizing the objects by creating object model
diagram
• Defining the internals of the objects, or object attributes
• Defining the behavior of the objects, i.e., object actions
• Describing how the objects interact
2/9/2024
Dr K Swaroopa
OOAD
Aditya Engineering College (A)
UML & DP UNIT-I
Object-Oriented Design
Object–Oriented Design (OOD) involves
implementation of the conceptual model
produced during object-oriented analysis.
Grady Booch has defined object-oriented design
as “a method of design encompassing the
process of object-oriented decomposition and a
notation for depicting both logical and physical
as well as static and dynamic models of the
system under design”.
2/9/2024
Dr K Swaroopa
OOAD
Aditya Engineering College (A)
UML & DP UNIT-I
Object-Oriented Programming
Object-oriented programming (OOP) is a programming
paradigm based upon objects (having both data and
methods) that aims to incorporate the advantages of
modularity and reusability. Objects, which are usually
instances of classes, are used to interact with one
another to design applications and computer programs.
2/9/2024
Dr K Swaroopa
OOAD
Aditya Engineering College (A)
UML & DP UNIT-I
The important features of object–oriented programming
are −
• Bottom–up approach in program design
• Programs organized around objects, grouped in classes
• Focus on data with methods to operate upon object’s
data
• Interaction between objects through functions
• Reusability of design through creation of new classes by
adding features to existing classes
2/9/2024
Dr K Swaroopa
OOAD
The purpose of OO analysis and design can described as −
• Identifying the objects of a system.
• Identifying their relationships.
• Making a design, which can be converted to executables using OO
languages.
2/9/2024
Dr K Swaroopa
OOAD
ADITYA ENGINEERING COLLEGE (A)
Aditya Engineering College (A)
UML & DP UNIT-I
Fundamental concepts of the object-oriented world −
• Objects − Objects represent an entity and the basic building block.
• Class − Class is the blue print of an object.
• Abstraction − Abstraction represents the behavior of an real world entity.
• Encapsulation − Encapsulation is the mechanism of binding the data together and
hiding them from the outside world.
• Inheritance − Inheritance is the mechanism of making new classes from existing
ones.
• Polymorphism − It defines the mechanism to exists in different forms.
2/9/2024
Dr K Swaroopa
OOAD
Conceptual model of UML
• Basic building blocks
• Rules
• Common mechanisms
ADITYA ENGINEERING COLLEGE (A)
2/9/2024
Dr K Swaroopa
OOAD
Basic Building Blocks Of UML
• The three building blocks of UML are −
1. Things
2. Relationships
3. Diagrams
ADITYA ENGINEERING COLLEGE (A)
2/9/2024
Dr K Swaroopa
OOAD
ADITYA ENGINEERING COLLEGE (A)
2/9/2024
Dr K Swaroopa
OOAD
ADITYA ENGINEERING COLLEGE (A)
2/9/2024
Dr K Swaroopa
OOAD
• There are four kinds of things in UML, namely −
• Structural Things − These are the nouns of the UML models
representing the static elements that may be either physical or
conceptual. The structural things are class, interface, collaboration,
use case, active class, components, and nodes.
• Behavioral Things − These are the verbs of the UML models
representing the dynamic behavior over time and space. The two types
of behavioral things are interaction and state machine.
Things in UML ..
• Grouping Things They comprise the organizational parts
−
of the UML models. There is only one kind of grouping
thing, i.e., package.
• Annotational Things These are the explanations in the
−
UML models representing the comments applied to
describe elements.
ADITYA ENGINEERING COLLEGE (A)
2/9/2024
Dr K Swaroopa
OOAD
Relationships …
Relationships are the connection between things. The four types of
relationships that can be represented in UML are :
• Dependency − This is a semantic relationship between two things
such that a change in one thing brings a change in the other. The
former is the independent thing, while the latter is the dependent thing.
• Association − This is a structural relationship that represents a
group of links having common structure and common behavior.
2/9/2024
Dr K Swaroopa
OOAD
ADITYA ENGINEERING COLLEGE (A)
Relationships …
• Generalization − This represents a generalization/specialization
relationship in which subclasses inherit structure and behavior from
super-classes.
• Realization − This is a semantic relationship between two or more
classifiers such that one classifier lays down a contract that the other
classifiers ensure to abide by.
ADITYA ENGINEERING COLLEGE (A)
2/9/2024
Dr K Swaroopa
OOAD
Diagrams
▪A diagram is a graphical representation of a system. It comprises of a
group of elements generally in the form of a graph.
▪UML diagram can visually represent the architecture, design, and
implementation of complex software systems.
ADITYA ENGINEERING COLLEGE (A)
2/9/2024
Dr K Swaroopa
OOAD
Diagrams
UML includes nine diagrams −
1. Class Diagram
2. Object Diagram
3. Use Case Diagram
4. Sequence Diagram
5. Collaboration Diagram
6. State Chart Diagram
7. Activity Diagram
8. Component Diagram
9. Deployment Diagram
ADITYA ENGINEERING COLLEGE (A)
2/9/2024
Dr K Swaroopa
OOAD
Summary
ADITYA ENGINEERING COLLEGE (A)
2/9/2024
Dr K Swaroopa
OOAD
Any Queries / Clarifications Pls contact swaroopak@aec.edu.in
Thank you!!
ADITYA ENGINEERING COLLEGE (A)
2/9/2024
Dr K Swaroopa
OOAD
Systems-Models
• System A set of elements organized to achieve certain
−
objectives form a system. Systems are often divided into
subsystems and described by a set of models.
• Model Model is a simplified, complete, and consistent
−
abstraction of a system, created for better understanding of
the system.
• View A view is a projection of a system’s model from a
−
specific perspective.
ADITYA ENGINEERING COLLEGE (A)
2/9/2024 Dr K Swaroopa
OOAD
Summary
ADITYA ENGINEERING COLLEGE (A)
2/9/2024
Dr K Swaroopa
OOAD
Aditya Engineering College (A)
UML & DP UNIT-I
A diagram can be viewed as a graph containing vertices and edges. In
UML, vertices are replaced by things, and the edges are replaced
by relationships.
There are four types of things in UML. They are:
1) Structural things (nouns of uml – static parts)
2) Behavioral things (verbs of uml – dynamic parts)
3) Grouping things (organizational parts)
4) Annotational things (explanatory parts)
Friday, February 9, 2024
Dr.K.Swaroopa
Aditya Engineering College (A)
UML & DP UNIT-I
Structural Things
• Structural things are the nouns of UML models.
• These are the mostly static parts of a model,
• They represent elements that are either conceptual or physical.
• Collectively, the structural things are called classifiers.
Friday, February 9, 2024
Dr.K.Swaroopa
Aditya Engineering College (A)
UML & DP UNIT-I
Structural things define the static part of the model. They represent the physical
and conceptual elements. Following are the brief descriptions of the structural
things.
⮚ Class
⮚ Interface
⮚ Collaboration
⮚ Use case
⮚ Component
⮚ Node
Friday, February 9, 2024
Dr.K.Swaroopa
Aditya Engineering College (A)
UML & DP UNIT-I Friday, February 9, 2024
Dr.K.Swaroopa
Interface − Interface defines a set of operations,
which specify the responsibility of a class.
A node can be defined as a physical element that
exists at run time.
Class − Class represents a set of objects having similar
responsibilities
Aditya Engineering College (A)
UML & DP UNIT-I Friday, February 9, 2024
Dr.K.Swaroopa
Collaboration defines an interaction between
elements.
Use case represents a set of actions performed by a
system for a specific goal.
Component describes the physical part of a system.
Aditya Engineering College (A)
UML & DP UNIT-I
Behavioral Things
A behavioral thing consists of the dynamic parts of UML models. Following are
the behavioral things −
Interaction − Interaction is defined as a behavior that consists of a group of
messages exchanged among elements to accomplish a specific task.
State machine − State machine is useful when the state of an object in its life cycle
is important. It defines the sequence of states an object goes through in response
to events. Events are external factors responsible for state change.
Friday, February 9, 2024
Dr.K.Swaroopa
Aditya Engineering College (A)
UML & DP UNIT-I
Grouping Things
Grouping things can be defined as a mechanism to group elements of a UML
model together.
There is only one grouping thing available −
Package − Package is the only one grouping thing available for gathering structural
and behavioral things.
Package :
Friday, February 9, 2024
Dr.K.Swaroopa
Aditya Engineering College (A)
UML & DP UNIT-I Friday, February 9, 2024
Dr.K.Swaroopa
Annotational things are the explanatory parts of UML models.
Annotational things can be defined as a mechanism to capture remarks,
descriptions, and comments of UML model elements.
Note - It is the only one Annotational thing available. A note is used to render
comments, constraints, etc. of an UML element.
Annotational things
Relation ships
2/9/2024
Dr K Swaroopa
OOAD
Relationship is another most important building block of UML. It shows how the
elements are associated with each other and this association describes functionality
of an application. We use them to write well-formed models .
There are four kinds of relationships available.
Dependency
• Dependency is a semantic relationship between two model elements.
• When a change to one element (the independent one) may affect the semantics of
the other element (the dependent one).
• Graphically, a dependency is rendered as a dashed line, possibly directed, and
occasionally including a label.
2/9/2024
Dr K Swaroopa
OOAD
Aditya Engineering College (A)
UML & DP UNIT-I Friday, February 9, 2024
Dr.K.Swaroopa
Association
• Association is basically a set of links that connects the elements of a
UML model.
• It also describes how many objects are taking part in that
relationship.
Aditya Engineering College (A)
UML & DP UNIT-I
Association
• Describes a set of links, a link being a connection among objects that
are instances of the classes .
• 1-Many
• 1-1
• Many-1
• Many-Many
Friday, February 9, 2024
Dr.K.Swaroopa
Aditya Engineering College (A)
UML & DP UNIT-I
Generalization
Generalization can be defined as a relationship which connects a specialized element with a generalized element.
It basically describes the inheritance relationship in the world of objects.
Realization
Realization can be defined as a relationship in which two elements are connected.
One element describes some responsibility, which is not implemented and the other one implements them.
This relationship exists in case of interfaces.
2/9/2024
Dr K Swaroopa
OOAD
Aditya Engineering College (A)
UML & DP UNIT-I
UML Diagrams
• UML diagrams are the ultimate output of the entire discussion. All
the elements, relationships are used to make a complete UML
diagram and the diagram represents a system.
• The visual effect of the UML diagram is the most important part of
the entire process. All the other elements are used to make it
complete.
Friday, February 9, 2024
Dr.K.Swaroopa
Aditya Engineering College (A)
UML & DP UNIT-I
• Structural Diagrams : Depicts Static view of the model.
• Class diagram : Class diagrams are the most popular UML diagrams used for
construction of software applications. Class diagram is basically a graphical
representation of the static view of the system and represents different aspects of
the application.
• Object diagram : The difference is that a class diagram represents an abstract
model consisting of classes and their relationships. However, an object diagram
represents an instance at a particular moment, which is concrete in nature.
It means the object diagram is closer to the actual system behavior. The purpose is
to capture the static view of a system at a particular moment.
2/9/2024
Dr K Swaroopa
OOAD
Structural Diagrams
Aditya Engineering College (A)
UML & DP UNIT-I
• Component diagram :Component diagrams can also be described as a static
implementation view of a system. Static implementation represents the
organization of the components at a particular moment.
The purpose of the component diagram can be summarized as −
• Visualize the components of a system.
• Construct executables by using forward and reverse engineering.
• Describe the organization and relationships of the components.
2/9/2024
Dr K Swaroopa
OOAD
Aditya Engineering College (A)
UML & DP UNIT-I
Deployment diagram : Deployment diagrams shows how components are deployed
in hardware. Deployment diagrams are used by the system engineers.
The purpose of deployment diagrams can be described as −
• Visualize the hardware topology of a system.
• Describe the hardware components used to deploy software components.
• Describe the runtime processing nodes.
2/9/2024
Dr K Swaroopa
OOAD
Aditya Engineering College (A)
UML & DP UNIT-I 2/9/2024
Dr K Swaroopa
OOAD
Aditya Engineering College (A)
UML & DP UNIT-I
• Class diagram
• Object diagram
• Use case diagram
• Sequence diagram
• Collaboration diagram
• Activity diagram
• State chart diagram
• Deployment diagram
• Component diagram
Friday, February 9, 2024
Dr.K.Swaroopa
UML Diagrams
Aditya Engineering College (A)
UML & DP UNIT-I
Summary
2/9/2024
Dr K Swaroopa
OOAD
List Of Relationships
List Of UML diagrams
Aditya Engineering College (A)
UML & DP UNIT-I 2/9/2024
Dr K Swaroopa
OOAD
List Of Relationships
Aditya Engineering College (A)
UML & DP UNIT-I 2/9/2024
Dr K Swaroopa
OOAD
Class Diagrams
⮚ Class diagram is a static diagram & represents the static view of an application.
⮚ Class diagram is not only used for visualizing, describing, and documenting
different aspects of a system but also for constructing executable code of the
software application.
⮚ Class diagram describes the attributes and operations of a class and also the
constraints imposed on the system.
⮚ The class diagrams are widely used in the modeling of object-oriented systems
which can be mapped directly with object-oriented languages.
⮚ Class diagram shows a collection of classes, interfaces, associations,
collaborations, and constraints. It is also known as a structural diagram.
Aditya Engineering College (A)
UML & DP UNIT-I
The purpose of the class diagram can be summarized as −
• Analysis and design of the static view of an application.
• Describe responsibilities of a system.
• Base for component and deployment diagrams.
• Forward and reverse engineering.
2/9/2024
Dr K Swaroopa
OOAD
Aditya Engineering College (A)
UML & DP UNIT-I
The following points should be remembered while drawing a class diagram −
• The name of the class diagram should be meaningful to describe the aspect
of the system.
• Each element and their relationships should be identified in advance.
• Responsibility (attributes and methods) of each class should be clearly
identified
• For each class, minimum number of properties should be specified, as
unnecessary properties will make the diagram complicated.
• At the end of the drawing it should be understandable to the developer/coder.
• Finally, before making the final version, the diagram should be drawn on
plain paper and reworked as many times as possible to make it correct.
2/9/2024
Dr K Swaroopa
OOAD
⮚ Order and Customer are identified as the two elements of the system.
They have a one-to-many relationship because a customer can have
multiple-orders.
Order class is an abstract class and it has two concrete classes
(inheritance relationship) Special Order and Normal Order.
ADITYA ENGINEERING COLLEGE (A)
2/9/2024 Dr K Swaroopa OOAD
Order Management System of an application
Class diagram
2/9/2024
Dr K Swaroopa
OOAD
ADITYA ENGINEERING COLLEGE (A)
2/9/2024
Dr K Swaroopa
Object Diagrams
2/9/2024
Dr K Swaroopa
OOAD
ADITYA ENGINEERING COLLEGE (A)
• Object diagrams are derived from class diagrams so object diagrams are dependent
upon class diagrams.
• Object diagrams represent an instance of a class diagram. The basic concepts are
similar for class diagrams and object diagrams.
• Object diagrams also represent the static view of a system but this static view is a
snapshot of the system at a particular moment.
• Object diagrams are used to render a set of objects and their relationships as an
instance.
The purpose of the object diagram can be summarized as −
2/9/2024
Dr K Swaroopa
OOAD
ADITYA ENGINEERING COLLEGE (A)
• Forward and reverse engineering.
• Object relationships of a system
• Static view of an interaction.
• Understand object behavior and their relationship from practical perspective
2/9/2024
Dr K Swaroopa
OOAD
ADITYA ENGINEERING COLLEGE (A)
The following things are to be decided before starting the construction of the diagram −
• The object diagram should have a meaningful name to indicate its purpose.
• The most important elements are to be identified.
• The association among objects should be clarified.
• Values of different elements need to be captured to include in the object diagram.
• Add proper notes at points where more clarity is required.
2/9/2024
Dr K Swaroopa
OOAD
ADITYA ENGINEERING COLLEGE (A)
The following diagram is an example of an object diagram.
It represents the Order management system which we have discussed in the Class
Diagram.
The following diagram is an instance of the system at a particular time of purchase. It
has the following objects.
•Customer
•Order
•SpecialOrder
•NormalOrder
2/9/2024
Dr K Swaroopa
OOAD
ADITYA ENGINEERING COLLEGE (A)
2/9/2024
Dr K Swaroopa
OOAD
ADITYA ENGINEERING COLLEGE (A)
Summary
UML models of class and object diagrams constructed for Order-Management-System.
Rules
ADITYA ENGINEERING COLLEGE (A)
2/9/2024
Dr K Swaroopa
OOAD
• UML has a number of rules so that the models are
semantically self-consistent and related to other models in
the system harmoniously. UML has semantic rules for the
following −
• Names
• Scope
• Visibility
• Integrity
• Execution
Common Mechanisms
ADITYA ENGINEERING COLLEGE (A)
2/9/2024
Dr K Swaroopa
OOAD
• Specifications
• Adornments
• Common Divisions
• Extensibility Mechanisms

object oriented analysis and design unit-1

  • 1.
    OBJECT ORIENTED ANALYSISAND DESIGN (Professional Elective-II) 201CS6E03 UNIT-1 INTRODUCTION TO UML ADITYA ENGINEERING COLLEGE (A) 2/9/2024 Dr K Swaroopa OOAD 1
  • 2.
    OBJECT ORIENTED ANALYSISAND DESIGN TOPIC : CONCEPTUAL MODEL OF UML CO1 : ILLUSTRATE SOFTWARE DESIGN WITH UML DIAGRAMS 2/9/2024 Dr K Swaroopa OOAD ADITYA ENGINEERING COLLEGE (A)
  • 3.
    Unified Modeling Language(UML)… • It helps to specify, construct, visualize and document the artifacts of an object-oriented system. It is used to depict the structures and the relationships in a complex system. • UML was created by the Object Management Group (OMG) and UML 1.0 specification draft was proposed to the OMG in January 1997. • UML was initially started to capture the behavior of complex software and non-software system. ADITYA ENGINEERING COLLEGE (A) 2/9/2024 Dr K Swaroopa OOAD
  • 4.
    Unified Modeling Language(UML)… • UML is different from the other common programming languages such as C++, Java, COBOL, etc. • UML is a pictorial language used to make software blueprints. • UML can be described as a general purpose visual modeling language to visualize, specify, construct, and document software system. • UML is generally used to model software systems, it is not limited within this boundary. It is also used to model non-software systems as well. • For example, the process flow in a manufacturing unit, etc. • Goal of UML : as a simple modeling mechanism to model all possible practical systems in today’s complex environment. 2/9/2024 Dr K Swaroopa OOAD ADITYA ENGINEERING COLLEGE (A)
  • 5.
    Aditya Engineering College(A) UML & DP UNIT-I UML Pioneers 2/9/2024 Dr K Swaroopa OOAD
  • 6.
    Aditya Engineering College(A) UML & DP UNIT-I Grady Booch has defined OOA as, “Object-oriented analysis is a method of analysis that examines requirements from the perspective of the classes and objects found in the vocabulary of the problem domain”. The primary tasks in object-oriented analysis (OOA) are 2/9/2024 Dr K Swaroopa OOAD
  • 7.
    Aditya Engineering College(A) UML & DP UNIT-I • Identifying objects • Organizing the objects by creating object model diagram • Defining the internals of the objects, or object attributes • Defining the behavior of the objects, i.e., object actions • Describing how the objects interact 2/9/2024 Dr K Swaroopa OOAD
  • 8.
    Aditya Engineering College(A) UML & DP UNIT-I Object-Oriented Design Object–Oriented Design (OOD) involves implementation of the conceptual model produced during object-oriented analysis. Grady Booch has defined object-oriented design as “a method of design encompassing the process of object-oriented decomposition and a notation for depicting both logical and physical as well as static and dynamic models of the system under design”. 2/9/2024 Dr K Swaroopa OOAD
  • 9.
    Aditya Engineering College(A) UML & DP UNIT-I Object-Oriented Programming Object-oriented programming (OOP) is a programming paradigm based upon objects (having both data and methods) that aims to incorporate the advantages of modularity and reusability. Objects, which are usually instances of classes, are used to interact with one another to design applications and computer programs. 2/9/2024 Dr K Swaroopa OOAD
  • 10.
    Aditya Engineering College(A) UML & DP UNIT-I The important features of object–oriented programming are − • Bottom–up approach in program design • Programs organized around objects, grouped in classes • Focus on data with methods to operate upon object’s data • Interaction between objects through functions • Reusability of design through creation of new classes by adding features to existing classes 2/9/2024 Dr K Swaroopa OOAD
  • 11.
    The purpose ofOO analysis and design can described as − • Identifying the objects of a system. • Identifying their relationships. • Making a design, which can be converted to executables using OO languages. 2/9/2024 Dr K Swaroopa OOAD ADITYA ENGINEERING COLLEGE (A)
  • 12.
    Aditya Engineering College(A) UML & DP UNIT-I Fundamental concepts of the object-oriented world − • Objects − Objects represent an entity and the basic building block. • Class − Class is the blue print of an object. • Abstraction − Abstraction represents the behavior of an real world entity. • Encapsulation − Encapsulation is the mechanism of binding the data together and hiding them from the outside world. • Inheritance − Inheritance is the mechanism of making new classes from existing ones. • Polymorphism − It defines the mechanism to exists in different forms. 2/9/2024 Dr K Swaroopa OOAD
  • 13.
    Conceptual model ofUML • Basic building blocks • Rules • Common mechanisms ADITYA ENGINEERING COLLEGE (A) 2/9/2024 Dr K Swaroopa OOAD
  • 14.
    Basic Building BlocksOf UML • The three building blocks of UML are − 1. Things 2. Relationships 3. Diagrams ADITYA ENGINEERING COLLEGE (A) 2/9/2024 Dr K Swaroopa OOAD
  • 15.
    ADITYA ENGINEERING COLLEGE(A) 2/9/2024 Dr K Swaroopa OOAD
  • 16.
    ADITYA ENGINEERING COLLEGE(A) 2/9/2024 Dr K Swaroopa OOAD • There are four kinds of things in UML, namely − • Structural Things − These are the nouns of the UML models representing the static elements that may be either physical or conceptual. The structural things are class, interface, collaboration, use case, active class, components, and nodes. • Behavioral Things − These are the verbs of the UML models representing the dynamic behavior over time and space. The two types of behavioral things are interaction and state machine.
  • 17.
    Things in UML.. • Grouping Things They comprise the organizational parts − of the UML models. There is only one kind of grouping thing, i.e., package. • Annotational Things These are the explanations in the − UML models representing the comments applied to describe elements. ADITYA ENGINEERING COLLEGE (A) 2/9/2024 Dr K Swaroopa OOAD
  • 18.
    Relationships … Relationships arethe connection between things. The four types of relationships that can be represented in UML are : • Dependency − This is a semantic relationship between two things such that a change in one thing brings a change in the other. The former is the independent thing, while the latter is the dependent thing. • Association − This is a structural relationship that represents a group of links having common structure and common behavior. 2/9/2024 Dr K Swaroopa OOAD ADITYA ENGINEERING COLLEGE (A)
  • 19.
    Relationships … • Generalization− This represents a generalization/specialization relationship in which subclasses inherit structure and behavior from super-classes. • Realization − This is a semantic relationship between two or more classifiers such that one classifier lays down a contract that the other classifiers ensure to abide by. ADITYA ENGINEERING COLLEGE (A) 2/9/2024 Dr K Swaroopa OOAD
  • 20.
    Diagrams ▪A diagram isa graphical representation of a system. It comprises of a group of elements generally in the form of a graph. ▪UML diagram can visually represent the architecture, design, and implementation of complex software systems. ADITYA ENGINEERING COLLEGE (A) 2/9/2024 Dr K Swaroopa OOAD
  • 21.
    Diagrams UML includes ninediagrams − 1. Class Diagram 2. Object Diagram 3. Use Case Diagram 4. Sequence Diagram 5. Collaboration Diagram 6. State Chart Diagram 7. Activity Diagram 8. Component Diagram 9. Deployment Diagram ADITYA ENGINEERING COLLEGE (A) 2/9/2024 Dr K Swaroopa OOAD
  • 22.
    Summary ADITYA ENGINEERING COLLEGE(A) 2/9/2024 Dr K Swaroopa OOAD
  • 23.
    Any Queries /Clarifications Pls contact swaroopak@aec.edu.in Thank you!! ADITYA ENGINEERING COLLEGE (A) 2/9/2024 Dr K Swaroopa OOAD
  • 24.
    Systems-Models • System Aset of elements organized to achieve certain − objectives form a system. Systems are often divided into subsystems and described by a set of models. • Model Model is a simplified, complete, and consistent − abstraction of a system, created for better understanding of the system. • View A view is a projection of a system’s model from a − specific perspective. ADITYA ENGINEERING COLLEGE (A) 2/9/2024 Dr K Swaroopa OOAD
  • 25.
    Summary ADITYA ENGINEERING COLLEGE(A) 2/9/2024 Dr K Swaroopa OOAD
  • 26.
    Aditya Engineering College(A) UML & DP UNIT-I A diagram can be viewed as a graph containing vertices and edges. In UML, vertices are replaced by things, and the edges are replaced by relationships. There are four types of things in UML. They are: 1) Structural things (nouns of uml – static parts) 2) Behavioral things (verbs of uml – dynamic parts) 3) Grouping things (organizational parts) 4) Annotational things (explanatory parts) Friday, February 9, 2024 Dr.K.Swaroopa
  • 27.
    Aditya Engineering College(A) UML & DP UNIT-I Structural Things • Structural things are the nouns of UML models. • These are the mostly static parts of a model, • They represent elements that are either conceptual or physical. • Collectively, the structural things are called classifiers. Friday, February 9, 2024 Dr.K.Swaroopa
  • 28.
    Aditya Engineering College(A) UML & DP UNIT-I Structural things define the static part of the model. They represent the physical and conceptual elements. Following are the brief descriptions of the structural things. ⮚ Class ⮚ Interface ⮚ Collaboration ⮚ Use case ⮚ Component ⮚ Node Friday, February 9, 2024 Dr.K.Swaroopa
  • 29.
    Aditya Engineering College(A) UML & DP UNIT-I Friday, February 9, 2024 Dr.K.Swaroopa Interface − Interface defines a set of operations, which specify the responsibility of a class. A node can be defined as a physical element that exists at run time. Class − Class represents a set of objects having similar responsibilities
  • 30.
    Aditya Engineering College(A) UML & DP UNIT-I Friday, February 9, 2024 Dr.K.Swaroopa Collaboration defines an interaction between elements. Use case represents a set of actions performed by a system for a specific goal. Component describes the physical part of a system.
  • 31.
    Aditya Engineering College(A) UML & DP UNIT-I Behavioral Things A behavioral thing consists of the dynamic parts of UML models. Following are the behavioral things − Interaction − Interaction is defined as a behavior that consists of a group of messages exchanged among elements to accomplish a specific task. State machine − State machine is useful when the state of an object in its life cycle is important. It defines the sequence of states an object goes through in response to events. Events are external factors responsible for state change. Friday, February 9, 2024 Dr.K.Swaroopa
  • 32.
    Aditya Engineering College(A) UML & DP UNIT-I Grouping Things Grouping things can be defined as a mechanism to group elements of a UML model together. There is only one grouping thing available − Package − Package is the only one grouping thing available for gathering structural and behavioral things. Package : Friday, February 9, 2024 Dr.K.Swaroopa
  • 33.
    Aditya Engineering College(A) UML & DP UNIT-I Friday, February 9, 2024 Dr.K.Swaroopa Annotational things are the explanatory parts of UML models. Annotational things can be defined as a mechanism to capture remarks, descriptions, and comments of UML model elements. Note - It is the only one Annotational thing available. A note is used to render comments, constraints, etc. of an UML element. Annotational things
  • 34.
    Relation ships 2/9/2024 Dr KSwaroopa OOAD Relationship is another most important building block of UML. It shows how the elements are associated with each other and this association describes functionality of an application. We use them to write well-formed models . There are four kinds of relationships available.
  • 35.
    Dependency • Dependency isa semantic relationship between two model elements. • When a change to one element (the independent one) may affect the semantics of the other element (the dependent one). • Graphically, a dependency is rendered as a dashed line, possibly directed, and occasionally including a label. 2/9/2024 Dr K Swaroopa OOAD
  • 36.
    Aditya Engineering College(A) UML & DP UNIT-I Friday, February 9, 2024 Dr.K.Swaroopa Association • Association is basically a set of links that connects the elements of a UML model. • It also describes how many objects are taking part in that relationship.
  • 37.
    Aditya Engineering College(A) UML & DP UNIT-I Association • Describes a set of links, a link being a connection among objects that are instances of the classes . • 1-Many • 1-1 • Many-1 • Many-Many Friday, February 9, 2024 Dr.K.Swaroopa
  • 38.
    Aditya Engineering College(A) UML & DP UNIT-I Generalization Generalization can be defined as a relationship which connects a specialized element with a generalized element. It basically describes the inheritance relationship in the world of objects. Realization Realization can be defined as a relationship in which two elements are connected. One element describes some responsibility, which is not implemented and the other one implements them. This relationship exists in case of interfaces. 2/9/2024 Dr K Swaroopa OOAD
  • 39.
    Aditya Engineering College(A) UML & DP UNIT-I UML Diagrams • UML diagrams are the ultimate output of the entire discussion. All the elements, relationships are used to make a complete UML diagram and the diagram represents a system. • The visual effect of the UML diagram is the most important part of the entire process. All the other elements are used to make it complete. Friday, February 9, 2024 Dr.K.Swaroopa
  • 40.
    Aditya Engineering College(A) UML & DP UNIT-I • Structural Diagrams : Depicts Static view of the model. • Class diagram : Class diagrams are the most popular UML diagrams used for construction of software applications. Class diagram is basically a graphical representation of the static view of the system and represents different aspects of the application. • Object diagram : The difference is that a class diagram represents an abstract model consisting of classes and their relationships. However, an object diagram represents an instance at a particular moment, which is concrete in nature. It means the object diagram is closer to the actual system behavior. The purpose is to capture the static view of a system at a particular moment. 2/9/2024 Dr K Swaroopa OOAD Structural Diagrams
  • 41.
    Aditya Engineering College(A) UML & DP UNIT-I • Component diagram :Component diagrams can also be described as a static implementation view of a system. Static implementation represents the organization of the components at a particular moment. The purpose of the component diagram can be summarized as − • Visualize the components of a system. • Construct executables by using forward and reverse engineering. • Describe the organization and relationships of the components. 2/9/2024 Dr K Swaroopa OOAD
  • 42.
    Aditya Engineering College(A) UML & DP UNIT-I Deployment diagram : Deployment diagrams shows how components are deployed in hardware. Deployment diagrams are used by the system engineers. The purpose of deployment diagrams can be described as − • Visualize the hardware topology of a system. • Describe the hardware components used to deploy software components. • Describe the runtime processing nodes. 2/9/2024 Dr K Swaroopa OOAD
  • 43.
    Aditya Engineering College(A) UML & DP UNIT-I 2/9/2024 Dr K Swaroopa OOAD
  • 44.
    Aditya Engineering College(A) UML & DP UNIT-I • Class diagram • Object diagram • Use case diagram • Sequence diagram • Collaboration diagram • Activity diagram • State chart diagram • Deployment diagram • Component diagram Friday, February 9, 2024 Dr.K.Swaroopa UML Diagrams
  • 45.
    Aditya Engineering College(A) UML & DP UNIT-I Summary 2/9/2024 Dr K Swaroopa OOAD List Of Relationships List Of UML diagrams
  • 46.
    Aditya Engineering College(A) UML & DP UNIT-I 2/9/2024 Dr K Swaroopa OOAD List Of Relationships
  • 47.
    Aditya Engineering College(A) UML & DP UNIT-I 2/9/2024 Dr K Swaroopa OOAD Class Diagrams ⮚ Class diagram is a static diagram & represents the static view of an application. ⮚ Class diagram is not only used for visualizing, describing, and documenting different aspects of a system but also for constructing executable code of the software application. ⮚ Class diagram describes the attributes and operations of a class and also the constraints imposed on the system. ⮚ The class diagrams are widely used in the modeling of object-oriented systems which can be mapped directly with object-oriented languages. ⮚ Class diagram shows a collection of classes, interfaces, associations, collaborations, and constraints. It is also known as a structural diagram.
  • 48.
    Aditya Engineering College(A) UML & DP UNIT-I The purpose of the class diagram can be summarized as − • Analysis and design of the static view of an application. • Describe responsibilities of a system. • Base for component and deployment diagrams. • Forward and reverse engineering. 2/9/2024 Dr K Swaroopa OOAD
  • 49.
    Aditya Engineering College(A) UML & DP UNIT-I The following points should be remembered while drawing a class diagram − • The name of the class diagram should be meaningful to describe the aspect of the system. • Each element and their relationships should be identified in advance. • Responsibility (attributes and methods) of each class should be clearly identified • For each class, minimum number of properties should be specified, as unnecessary properties will make the diagram complicated. • At the end of the drawing it should be understandable to the developer/coder. • Finally, before making the final version, the diagram should be drawn on plain paper and reworked as many times as possible to make it correct. 2/9/2024 Dr K Swaroopa OOAD
  • 50.
    ⮚ Order andCustomer are identified as the two elements of the system. They have a one-to-many relationship because a customer can have multiple-orders. Order class is an abstract class and it has two concrete classes (inheritance relationship) Special Order and Normal Order. ADITYA ENGINEERING COLLEGE (A) 2/9/2024 Dr K Swaroopa OOAD Order Management System of an application
  • 51.
    Class diagram 2/9/2024 Dr KSwaroopa OOAD ADITYA ENGINEERING COLLEGE (A)
  • 52.
  • 53.
    Object Diagrams 2/9/2024 Dr KSwaroopa OOAD ADITYA ENGINEERING COLLEGE (A) • Object diagrams are derived from class diagrams so object diagrams are dependent upon class diagrams. • Object diagrams represent an instance of a class diagram. The basic concepts are similar for class diagrams and object diagrams. • Object diagrams also represent the static view of a system but this static view is a snapshot of the system at a particular moment. • Object diagrams are used to render a set of objects and their relationships as an instance.
  • 54.
    The purpose ofthe object diagram can be summarized as − 2/9/2024 Dr K Swaroopa OOAD ADITYA ENGINEERING COLLEGE (A) • Forward and reverse engineering. • Object relationships of a system • Static view of an interaction. • Understand object behavior and their relationship from practical perspective
  • 55.
    2/9/2024 Dr K Swaroopa OOAD ADITYAENGINEERING COLLEGE (A) The following things are to be decided before starting the construction of the diagram − • The object diagram should have a meaningful name to indicate its purpose. • The most important elements are to be identified. • The association among objects should be clarified. • Values of different elements need to be captured to include in the object diagram. • Add proper notes at points where more clarity is required.
  • 56.
    2/9/2024 Dr K Swaroopa OOAD ADITYAENGINEERING COLLEGE (A) The following diagram is an example of an object diagram. It represents the Order management system which we have discussed in the Class Diagram. The following diagram is an instance of the system at a particular time of purchase. It has the following objects. •Customer •Order •SpecialOrder •NormalOrder
  • 57.
    2/9/2024 Dr K Swaroopa OOAD ADITYAENGINEERING COLLEGE (A)
  • 58.
    2/9/2024 Dr K Swaroopa OOAD ADITYAENGINEERING COLLEGE (A) Summary UML models of class and object diagrams constructed for Order-Management-System.
  • 59.
    Rules ADITYA ENGINEERING COLLEGE(A) 2/9/2024 Dr K Swaroopa OOAD • UML has a number of rules so that the models are semantically self-consistent and related to other models in the system harmoniously. UML has semantic rules for the following − • Names • Scope • Visibility • Integrity • Execution
  • 60.
    Common Mechanisms ADITYA ENGINEERINGCOLLEGE (A) 2/9/2024 Dr K Swaroopa OOAD • Specifications • Adornments • Common Divisions • Extensibility Mechanisms