OOP Vs OOD
OOP Vs OOD
Analysis and
Design
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
Object Oriented Analysis and Design Design
Software Design
Tools
Object Oriented
Fundamentals of (Object-Oriented) Software Design Programming
Concepts
Basics of Object
Oriented Analysis
and Design
Lecture 01-02 Quality Design
Concepts
Object Oriented
Agenda Analysis and
Design
Fundamentals of
(OO) Software
Design
Introduction Introduction
Types of Software
Design
Types of Software Design Software Design
Tools
Object Oriented
Software Design Tools Programming
Concepts
Basics of Object
Oriented Analysis
Object Oriented Programming Concepts and Design
Quality Design
Concepts
Basics of Object Oriented Analysis and Design
Fundamentals of
(OO) Software
Design
Introduction Introduction
Types of Software
Design
Types of Software Design Software Design
Tools
Object Oriented
Software Design Tools Programming
Concepts
Basics of Object
Oriented Analysis
Object Oriented Programming Concepts and Design
Quality Design
Concepts
Basics of Object Oriented Analysis and Design
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
Design
I Analysis Introduction
Basics of Object
Oriented Analysis
and Design
Quality Design
Concepts
Figure: SDLC
Object Oriented
Analysis Analysis and
Design
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
Design
I Analysis emphasizes an investigation of the problem and
Software Design
requirements, rather than a solution. Tools
I For example, if a new computerized library information Object Oriented
Programming
system is desired, how will it be used? Concepts
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
Design
I Analysis emphasizes an investigation of the problem and
Software Design
requirements, rather than a solution. Tools
I For example, if a new computerized library information Object Oriented
Programming
system is desired, how will it be used? Concepts
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
Design
I Design emphasizes a conceptual solution that fulfills the Software Design
Tools
requirements, rather than its implementation
Object Oriented
I It explains the idea/concept of something usually with Programming
Concepts
graphical diagrams Basics of Object
Oriented Analysis
I The design is a representation of a product or a system and Design
with sufficient detail for implementation Quality Design
Concepts
Object Oriented
Software Design Analysis and
Design
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
I Software design is a process to transform user Design
requirements into some suitable form, which helps the Software Design
Tools
programmer in software coding and implementation Object Oriented
I Design is a meaningful representation of something that Programming
Concepts
is to be built Basics of Object
Oriented Analysis
I Design is driven by known solutions, which increases and Design
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
I Software design is a process to transform user Design
requirements into some suitable form, which helps the Software Design
Tools
programmer in software coding and implementation Object Oriented
I Design is a meaningful representation of something that Programming
Concepts
is to be built Basics of Object
Oriented Analysis
I Design is driven by known solutions, which increases and Design
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
Design
I one that will be of no or very little use for similar Basics of Object
Oriented Analysis
projects (not reusable) and Design
Quality Design
Concepts
Object Oriented
Agenda Analysis and
Design
Fundamentals of
(OO) Software
Design
Introduction Introduction
Types of Software
Design
Types of Software Design Software Design
Tools
Object Oriented
Software Design Tools Programming
Concepts
Basics of Object
Oriented Analysis
Object Oriented Programming Concepts and Design
Quality Design
Concepts
Basics of Object Oriented Analysis and Design
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
Interface Design Design
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
Design
Architectural Design
Software Design
I Architectural design is the specification of the major Tools
Quality Design
internal details of major components are ignored Concepts
Object Oriented
Types of Software design – 3 Analysis and
Design
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
Design
Software Design
Detailed Design/Component-level design Tools
Quality Design
Concepts
Object Oriented
Agenda Analysis and
Design
Fundamentals of
(OO) Software
Design
Introduction Introduction
Types of Software
Design
Types of Software Design Software Design
Tools
Object Oriented
Software Design Tools Programming
Concepts
Basics of Object
Oriented Analysis
Object Oriented Programming Concepts and Design
Quality Design
Concepts
Basics of Object Oriented Analysis and Design
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
Design
Software Design
I Data Flow Diagram (DFD) Tools
Object Oriented
I Data flow diagram is graphical representation of flow of Programming
Concepts
data in an information system. It is capable of depicting
Basics of Object
incoming data flow, outgoing data flow and stored data. Oriented Analysis
and Design
Quality Design
Concepts
Object Oriented
Software Design Tools – 1 Analysis and
Design
Fundamentals of
(OO) Software
Design
Introduction
I Data Flow Diagram (DFD) Types of Software
I Data flow diagram is graphical representation of flow of Design
Basics of Object
Oriented Analysis
and Design
Quality Design
Concepts
Figure: 0-Level DFD
Object Oriented
Software Design Tools – 2 Analysis and
Design
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
Design
I HIPO Diagram Software Design
I HIPO diagram represents the hierarchy of modules in Tools
Object Oriented
the software system. Analyst uses HIPO diagram in Programming
order to obtain high-level view of system functions. It Concepts
Basics of Object
Oriented Analysis
and Design
Quality Design
Concepts
Fundamentals of
(OO) Software
Design
Introduction
I Entity-Relationship Model
Types of Software
I UML Design
Fundamentals of
(OO) Software
Design
Introduction
I Entity-Relationship Model
Types of Software
I UML Design
Fundamentals of
(OO) Software
Design
Introduction Introduction
Types of Software
Design
Types of Software Design Software Design
Tools
Object Oriented
Software Design Tools Programming
Concepts
Basics of Object
Oriented Analysis
Object Oriented Programming Concepts and Design
Quality Design
Concepts
Basics of Object Oriented Analysis and Design
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
Design
I Object is a real world physical entity Software Design
Tools
I It can be quantified to mean one specific item
Object Oriented
I Objects have physical existence Programming
Concepts
I Class is a template which represents all objects of same
Basics of Object
kind e.g., human being Oriented Analysis
and Design
I Class have logical existence
Quality Design
Concepts
Object Oriented
Attributes and Methods Analysis and
Design
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
Design
Software Design
Tools
I Attribute stores information about an instance Object Oriented
Programming
I Behaviors are the tasks that an object performs, Concepts
Quality Design
Concepts
Object Oriented
Encapsulation and Information Hiding Analysis and
Design
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
Design
I By Information Hiding we mean “showing only those
Software Design
details to the outside world which are necessary for the Tools
outside world and hiding all other details from the Object Oriented
Programming
outside world.” Concepts
Quality Design
I Information hiding is achieved using encapsulation Concepts
Object Oriented
Implementation Analysis and
Design
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
Design
I It is actual implementation of the behavior of the object Software Design
Tools
in any object oriented language
Object Oriented
I Internal data structures to hold an object state that will Programming
Concepts
be hidden from us it will store values for an object data
members Basics of Object
Oriented Analysis
I Functionality in the form of member functions to and Design
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
Design
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
Design
Simple Association
Software Design
I The two interacting objects have no intrinsic Tools
Basics of Object
Oriented Analysis
and Design
Quality Design
Concepts
Object Oriented
Association, Composition, and Aggregation Analysis and
Design
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
Design
Composition (consists of)
Software Design
I Life cycle of an object is dependent on the other object Tools
Object Oriented
I An object is born and destroyed with the other object Programming
Concepts
I Composition is a stronger relationship, because Basics of Object
Oriented Analysis
Composed object becomes a part of the composer and Design
Fundamentals of
(OO) Software
Design
Introduction
Composition (consists of) Types of Software
Design
I Life cycle of an object is dependent on the other object
Software Design
I An object is born and destroyed with the other object Tools
Object Oriented
I Composition is a stronger relationship, because Programming
Concepts
Composed object becomes a part of the composer Basics of Object
I Composed object can’t exist independently Oriented Analysis
and Design
Quality Design
Concepts
Object Oriented
Association, Composition, and Aggregation Analysis and
Design
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
Design
Quality Design
Concepts
Object Oriented
Association, Composition, and Aggregation Analysis and
Design
Fundamentals of
(OO) Software
Design
Introduction
Quality Design
Concepts
Object Oriented
Inheritance Analysis and
Design
Fundamentals of
(OO) Software
Design
Introduction
I A child inherits characteristics of its parents, besides Types of Software
Design
inherited characteristics, a child may have its own
Software Design
unique characteristics Tools
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
Design
Software Design
Tools
Object Oriented
Programming
Concepts
Basics of Object
Oriented Analysis
and Design
Quality Design
Concepts
Object Oriented
Polymorphism Analysis and
Design
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
Design
Software Design
I Polymorphism means that different objects can behave Tools
Object Oriented
in different ways for the same message (stimulus). Programming
Concepts
I Consequently, sender of a message does not need to
Basics of Object
know exact class of the receiver Oriented Analysis
and Design
Quality Design
Concepts
Object Oriented
Polymorphism Analysis and
Design
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
Design
Software Design
Tools
Object Oriented
Programming
Concepts
Basics of Object
Oriented Analysis
and Design
Quality Design
Concepts
Object Oriented
Agenda Analysis and
Design
Fundamentals of
(OO) Software
Design
Introduction Introduction
Types of Software
Design
Types of Software Design Software Design
Tools
Object Oriented
Software Design Tools Programming
Concepts
Basics of Object
Oriented Analysis
Object Oriented Programming Concepts and Design
Quality Design
Concepts
Basics of Object Oriented Analysis and Design
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
Design
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
Design
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
Design
I OOA - how to arrange a collection of classes to best
Software Design
representing your real-world problem in a format which Tools
Quality Design
I OOP is about making the class implementations work Concepts
Object Oriented
Three stages of the OO process Analysis and
Design
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
Design
I OOA - how to arrange a collection of classes to best
Software Design
representing your real-world problem in a format which Tools
Quality Design
I OOP is about making the class implementations work Concepts
Object Oriented
Three stages of the OO process Analysis and
Design
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
Design
I OOA - how to arrange a collection of classes to best
Software Design
representing your real-world problem in a format which Tools
Quality Design
I OOP is about making the class implementations work Concepts
Object Oriented
Object Oriented Analysis (OOA) Analysis and
Design
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
Design
I Identifying classes, attributes, and methods from
Software Design
problem statements Tools
I The nouns are likely to be either classes or member Object Oriented
Programming
fields of classes. The verbs are likely to be class Concepts
methods. Basics of Object
I Think about how best to group the nouns into classes, Oriented Analysis
and Design
and about which class should be responsible for which
Quality Design
action Concepts
Object Oriented
Object Oriented Analysis (OOA) Analysis and
Design
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
Design
I Identifying classes, attributes, and methods from
Software Design
problem statements Tools
I The nouns are likely to be either classes or member Object Oriented
Programming
fields of classes. The verbs are likely to be class Concepts
methods. Basics of Object
I Think about how best to group the nouns into classes, Oriented Analysis
and Design
and about which class should be responsible for which
Quality Design
action Concepts
Object Oriented
Object Oriented Analysis (OOA) Analysis and
Design
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
Design
I Identifying classes, attributes, and methods from
Software Design
problem statements Tools
I The nouns are likely to be either classes or member Object Oriented
Programming
fields of classes. The verbs are likely to be class Concepts
methods. Basics of Object
I Think about how best to group the nouns into classes, Oriented Analysis
and Design
and about which class should be responsible for which
Quality Design
action Concepts
Object Oriented
Object Oriented Analysis (OOA) Analysis and
Design
Fundamentals of
(OO) Software
Design
Example
Introduction
I Access Control System - We have a task to design
Types of Software
and implement an access control system for a company Design
Fundamentals of
(OO) Software
Design
Example
I Access Control System - We have a task to design Introduction
Types of Software
and implement an access control system for a Design
company with more than 100 staffs and 5 functional Software Design
Tools
departments . The access control system is used to Object Oriented
Programming
control the access to the doors in the office areas of Concepts
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
Design
Fundamentals of
(OO) Software
Design
Example
Introduction
Types of Software
Design
Software Design
Tools
Object Oriented
Programming
Concepts
Basics of Object
Oriented Analysis
and Design
Quality Design
Concepts
Object Oriented
Object Oriented Design (OOD) Analysis and
Design
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
Design
Software Design
Tools
How the classes relate to each other. Represent them in the Object Oriented
Programming
form a (class, object, sequence) diagram Concepts
Basics of Object
Oriented Analysis
and Design
Quality Design
Concepts
Object Oriented
Object Oriented Design (OOD) Analysis and
Design
Fundamentals of
(OO) Software
Design
Example
Introduction
Types of Software
Design
Software Design
Tools
Object Oriented
Programming
Concepts
Basics of Object
Oriented Analysis
and Design
Quality Design
Concepts
Object Oriented
Agenda Analysis and
Design
Fundamentals of
(OO) Software
Design
Introduction Introduction
Types of Software
Design
Types of Software Design Software Design
Tools
Object Oriented
Software Design Tools Programming
Concepts
Basics of Object
Oriented Analysis
Object Oriented Programming Concepts and Design
Quality Design
Concepts
Basics of Object Oriented Analysis and Design
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
Design
I Abstraction
Software Design
I Refinement Tools
Object Oriented
I Modularity Programming
Concepts
I Information Hiding Basics of Object
Oriented Analysis
I Cohesion and Design
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
Design
Quality Design
Concepts
Object Oriented
Abstraction Analysis and
Design
Fundamentals of
(OO) Software
Design
Introduction
Levels of Abstraction
Types of Software
I At the highest level of abstraction, a solution is stated Design
Fundamentals of
(OO) Software
Design
Introduction
Levels of Abstraction
Types of Software
I At the highest level of abstraction, a solution is stated Design
Fundamentals of
(OO) Software
Design
Fundamentals of
(OO) Software
Design
Fundamentals of
(OO) Software
Design
Fundamentals of
(OO) Software
Design
Introduction
Fundamentals of
(OO) Software
Design
Introduction
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
Design
I One of the oldest concepts in software design Software Design
Tools
I Software is divided into separately named and
Object Oriented
addressable components, often called, modules, that are Programming
Concepts
integrated to satisfy problem requirements Basics of Object
Oriented Analysis
I Don’t over modularize. The simplicity of each module and Design
will be overshadowed by the complexity of integration Quality Design
Concepts
Object Oriented
Modularity Analysis and
Design
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
Design
I One of the oldest concepts in software design Software Design
Tools
I Software is divided into separately named and
Object Oriented
addressable components, often called, modules, that are Programming
Concepts
integrated to satisfy problem requirements Basics of Object
Oriented Analysis
I Don’t over modularize. The simplicity of each module and Design
will be overshadowed by the complexity of integration Quality Design
Concepts
Object Oriented
Information Hiding – 1 Analysis and
Design
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
I Modules should be specified and designed so that Design
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
I Modules should be specified and designed so that Design
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
Design
I The greatest benefits of IH are achieved when
Software Design
modifications are required during testing and later, Tools
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
I Cohesion is the qualitative indication of the degree to Design
Software Design
which a module focuses on just one thing Tools
Basics of Object
I Highly cohesive modules are better, however, mid-range Oriented Analysis
and Design
cohesion is acceptable
Quality Design
I Low-end cohesion is very bad Concepts
Object Oriented
Cohesion Analysis and
Design
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
I Cohesion is the qualitative indication of the degree to Design
Software Design
which a module focuses on just one thing Tools
Basics of Object
I Highly cohesive modules are better, however, mid-range Oriented Analysis
and Design
cohesion is acceptable
Quality Design
I Low-end cohesion is very bad Concepts
Object Oriented
Cohesion Analysis and
Design
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
I Cohesion is the qualitative indication of the degree to Design
Software Design
which a module focuses on just one thing Tools
Basics of Object
I Highly cohesive modules are better, however, mid-range Oriented Analysis
and Design
cohesion is acceptable
Quality Design
I Low-end cohesion is very bad Concepts
Object Oriented
Cohesion Analysis and
Design
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
Types of Cohesion (Undesirable) Design
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
Types of Cohesion (Undesirable) Design
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
Types of Cohesion (Undesirable) Design
Fundamentals of
(OO) Software
Types of Cohesion (Acceptable) Design
Object Oriented
I Communicational cohesion occurs when all elements Programming
Concepts
of a component operate on the same input data,
Basics of Object
produce the same output data, or operate on one area Oriented Analysis
and Design
of a data structure (e.g., update record in database and
Quality Design
log that) Concepts
Fundamentals of
(OO) Software
Types of Cohesion (Acceptable) Design
Object Oriented
I Communicational cohesion occurs when all elements Programming
Concepts
of a component operate on the same input data,
Basics of Object
produce the same output data, or operate on one area Oriented Analysis
and Design
of a data structure (e.g., update record in database and
Quality Design
log that) Concepts
Fundamentals of
(OO) Software
Types of Cohesion (Acceptable) Design
Object Oriented
I Communicational cohesion occurs when all elements Programming
Concepts
of a component operate on the same input data,
Basics of Object
produce the same output data, or operate on one area Oriented Analysis
and Design
of a data structure (e.g., update record in database and
Quality Design
log that) Concepts
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
Types of Cohesion (Desirable) Design
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
Types of Cohesion (Desirable) Design
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
Design
I Coupling is a qualitative indication of the degree to
Software Design
which a module is connected to other modules and to Tools
Basics of Object
among modules in a software structure Oriented Analysis
and Design
I Loose coupling is better as simple connectivity is easier
Quality Design
to understand and less prone to ripple effect Concepts
Object Oriented
Coupling Analysis and
Design
Fundamentals of
(OO) Software
Design
Introduction
Types of Software
Design
I Coupling is a qualitative indication of the degree to
Software Design
which a module is connected to other modules and to Tools
Basics of Object
among modules in a software structure Oriented Analysis
and Design
I Loose coupling is better as simple connectivity is easier
Quality Design
to understand and less prone to ripple effect Concepts
Object Oriented
Cohesion Analysis and
Design
When using data coupling, shorter parameter lists are Object Oriented
Programming
preferred to longer ones Concepts
Quality Design
coupling, a smaller number of actual arguments are Concepts
preferable to a larger number because the only data
that should be passed to a module is what it requires
I Control coupling occurs when information is passed to
a module that affects its internal control. This is
undesirable because it requires the calling module to
know the internal operation of the module being called
Object Oriented
Cohesion Analysis and
Design
When using data coupling, shorter parameter lists are Object Oriented
Programming
preferred to longer ones Concepts
Quality Design
coupling, a smaller number of actual arguments are Concepts
preferable to a larger number because the only data
that should be passed to a module is what it requires
I Control coupling occurs when information is passed to
a module that affects its internal control. This is
undesirable because it requires the calling module to
know the internal operation of the module being called
Object Oriented
Cohesion Analysis and
Design
When using data coupling, shorter parameter lists are Object Oriented
Programming
preferred to longer ones Concepts
Quality Design
coupling, a smaller number of actual arguments are Concepts
preferable to a larger number because the only data
that should be passed to a module is what it requires
I Control coupling occurs when information is passed to
a module that affects its internal control. This is
undesirable because it requires the calling module to
know the internal operation of the module being called
Object Oriented
Cohesion Analysis and
Design
When using data coupling, shorter parameter lists are Object Oriented
Programming
preferred to longer ones Concepts
Quality Design
coupling, a smaller number of actual arguments are Concepts
preferable to a larger number because the only data
that should be passed to a module is what it requires
I Control coupling occurs when information is passed to
a module that affects its internal control. This is
undesirable because it requires the calling module to
know the internal operation of the module being called
Object Oriented
Coupling Analysis and
Design
Fundamentals of
(OO) Software
Design
Introduction
Types of Coupling Types of Software
Design
I External coupling occurs when a module depends on Software Design
the external environment Tools
Object Oriented
I Common coupling occurs when modules access Programming
Concepts
common areas of global or shared data. This form of
Basics of Object
coupling can cause one module to unintentionally Oriented Analysis
and Design
interfere with the operation of another module
Quality Design
I Content coupling occurs when one module uses Concepts
Fundamentals of
(OO) Software
Design
Introduction
Types of Coupling Types of Software
Design
I External coupling occurs when a module depends on Software Design
the external environment Tools
Object Oriented
I Common coupling occurs when modules access Programming
Concepts
common areas of global or shared data. This form of
Basics of Object
coupling can cause one module to unintentionally Oriented Analysis
and Design
interfere with the operation of another module
Quality Design
I Content coupling occurs when one module uses Concepts
Fundamentals of
(OO) Software
Design
Introduction
Types of Coupling Types of Software
Design
I External coupling occurs when a module depends on Software Design
the external environment Tools
Object Oriented
I Common coupling occurs when modules access Programming
Concepts
common areas of global or shared data. This form of
Basics of Object
coupling can cause one module to unintentionally Oriented Analysis
and Design
interfere with the operation of another module
Quality Design
I Content coupling occurs when one module uses Concepts