SlideShare a Scribd company logo
PRINCIPLE OF OOP’S
Chap 13/10/2016
1By:-Gourav Kottawar
By:-Gourav Kottawar
Contents
3/10/2016
2
 1.1 Introduction
 1.2 Procedural Vs Object Oriented
Programming
 1.3 Classes, Object, Data Abstraction,
 1.4 Encapsulation, Inheritance,
Polymorphism
 1.5 Dynamic Binding, Message Passing
 1.6 Object Oriented Languages
 1.7 Object Based languages
% - 5
By:-Gourav Kottawar
1.1 Introduction
3/10/2016
3
 C is a programming language developed in
the 1970's alongside the UNIX operating
system.
 C provides a comprehensive set of features
for handling a wide variety of applications,
such as systems development and scientific
computation.
 C++ is an “extension” of the C language, in
that most C programs are also C++
programs.
 C++, as opposed to C, supports “object-
oriented programming.”
By:-Gourav Kottawar
Principles of Object oriented
programming
3/10/2016
4
 Software Crisis
1. Real life problems
2. designing system with open interface
3. Reusability and extensibility
4. quality
5. Time schedule
6. Industrialize SDP.
By:-Gourav Kottawar
Layers of computer software
3/10/2016
5
Object Oriented
Programming
Procedure
Oriented
Assembly
Language
Machine
Languag
e
1.0
By:-Gourav Kottawar
Typical structure of Procedure
oriented programming
3/10/2016
6
By:-Gourav Kottawar
1.2 Procedural Vs Object Oriented
Programming
3/10/2016
7
Procedure Oriented
Programming
Object Oriented Programming
Divided Into
In POP, program is divided
into small parts
called functions.
In OOP, program is divided into
parts called objects.
Importance
In POP,Importance is not
given to data but to
functions as well
as sequence of actions to be
done.
In OOP, Importance is given to the
data rather than procedures or
functions because it works as areal
world.
Approach POP follows Top Down
approach.
OOP follows Bottom Up approach.
Access
Specifiers
POP does not have any
access specifier.
OOP has access specifiers named
Public, Private, Protected, etc.
Data Moving
In POP, Data can move
freely from function to
function in the system.
In OOP, objects can move and
communicate with each other
through member functions.By:-Gourav Kottawar
1.2 Procedural Vs Object Oriented
Programming
3/10/2016
8 Procedure Oriented
Programming
Object Oriented Programming
Expansion
To add new data and function
in POP is not so easy.
OOP provides an easy way to add
new data and function.
Data Access
In POP, Most function uses
Global data for sharing that can
be accessed freely from
function to function in the
system.
In OOP, data can not move easily
from function to function,it can be
kept public or private so we can
control the access of data.
Data Hiding
POP does not have any proper
way for hiding data so it is less
secure.
OOP provides Data Hiding so
provides more security.
Overloading In POP, Overloading is not
possible.
In OOP, overloading is possible in
the form of Function Overloading
and Operator Overloading.
Examples
Example of POP are : C, VB,
FORTRAN, Pascal.
Example of OOP are : C++, JAVA,
VB.NET, C#.NET.By:-Gourav Kottawar
Object Oriented paradigm
3/10/2016
9
 Emphasis is data rather than procedure.
 Programs are divided into what are known as objects.
 Data structures are designed such that they
characterize the objects.
 Functions that operate on the data of an object are
tied together in the data structure.
 Data is hidden and cannot be accessed by external
functions.
 Objects may communicate with each other through
functions.
 New data and functions can be easily added
whenever necessary.
 Follows bottom up approach
By:-Gourav Kottawar
Organization of data and functions
in oop
3/10/2016
10
By:-Gourav Kottawar
Basic concepts of object oriented
programming
3/10/2016
11
 Object
objects are runtime entities in an object
oriented system.
An object is anything that can be represented
by data in a computer’s memory and
manipulated by a computer program.
By:-Gourav Kottawar
objects
3/10/2016
12
Numbers
By:-Gourav Kottawar
objects
3/10/2016
13
Text
By:-Gourav Kottawar
objects
3/10/2016
14
Pictures
By:-Gourav Kottawar
objects
3/10/2016
15
Sound
By:-Gourav Kottawar
objects
3/10/2016
16
Video
By:-Gourav Kottawar
3/10/2016
Object-Oriented Programming
An object can be
something in the physical
world or even just an
abstract idea.
An airplane, for example,
is a physical object that
can be manipulated by a
computer.
17
3/10/2016
Object-Oriented Programming
An object can be
something in the
physical world or even
just an abstract idea.
A bank transaction is
an example of an
object that
is not physical.
18
Object-Oriented Programming
To a computer, an
object is simply
something that can be
represented by data in
the computer’s
memory and
manipulated by
computer programs.
3/10/2016 19
Object-Oriented Programming
The data that represent
the object are organized
into a set of properties.
The values stored in an
object’s properties at any
one time form the state
of an object.
Name: PA 3794
Owner: US Airlines
Location: 39 52′ 06″ N 75 13′ 52″ W
Heading: 271°
Altitude: 19 m
AirSpeed: 0
Make: Boeing
Model: 737
Weight: 32,820 kg
3/10/2016 20
3/10/2016
21
Two ways of representing an object
By:-Gourav Kottawar
Classes
3/10/2016
22
 The entire set of data and code of an object can
be made a user defined data type with the help
of a class.
 Objects are variables of the type class.
 Once a class has been defined, we can create
any number of objects belonging to that class.
 A class in collection of similar type objects.
By:-Gourav Kottawar
Object-Oriented Programming
Each copy of an object
from a particular class is
called an instance of
the object.
3/10/2016 23
Object-Oriented Programming
The act of creating a
new instance of an
object is called
instantiation.
3/10/2016 24
Object-Oriented Programming
A class can be thought
of as a blueprint for
instances of an object.
3/10/2016 25
Object-Oriented Programming
Two different instances of
the same class will have
the same properties, but
different values stored in
those properties.
3/10/2016 26
psulation
27
 The wrapping up of data and function into a single unit (called
class) is known as encapsulation.
 Data and encapsulation is the most striking feature of a class.
 The data is not accessible to the outside world, and only those
functions which are wrapped in the class can access it.
 These functions provide the interface between the object’s data
and the program.
 This insulation of the data from direct access by the program is
called data hiding or information hiding.
3/10/2016By:-Gourav Kottawar
Abstraction
3/10/2016
28
 Abstraction refers to the act of representing essential
features without including the
 background details or explanation. Classes use the
concept of abstraction and are defined
 as a list of abstract attributes such as size, wait, and cost,
and function operate on these
 attributes. They encapsulate all the essential properties of
the object that are to be created. The attributes are some
time called data members because they hold information.
The
 functions that operate on these data are sometimes called
methods or member function
By:-Gourav Kottawar
Abstraction
3/10/2016
29
By:-Gourav Kottawar
Inheritance
3/10/2016
30
 Inheritance is the process by which objects of
one class acquired the properties of objects of
another classes.
 It supports the concept of hierarchical
classification.
By:-Gourav Kottawar
Polymorphism
3/10/2016
31
 Polymorphism is another important OOP concept.
Polymorphism, a Greek term, means the ability to take
more than on form.
 An operation may exhibit different behavior is different
instances. The behavior depends upon the types of
data used in the operation.
 For example, consider the operation of addition.
 For two numbers, the operation will generate a sum.
 If the operands are strings, then the operation would
produce a third string by concatenation. The process
of making an operator to exhibit different behaviors in
different instances is known as operator overloading.
By:-Gourav Kottawar
3/10/2016
32  Polymorphism plays an important role in allowing
objects having different internal structures to share the
same external interface.
 Polymorphism is extensively used in implementing
inheritance.
By:-Gourav Kottawar
Dynamic binding
3/10/2016
33
 Binding refers to the linking of a procedure call to the
code to be executed in response to the call.
 Dynamic binding means that the code associated with a
given procedure call is not known until the time of the
call at run time.
 It is associated with polymorphism and inheritance.
 A function call associated with a polymorphic reference
depends on the dynamic type of that reference.
By:-Gourav Kottawar
Message binding
3/10/2016
34
 An object oriented program consists a set of
objects that communicate with each other. The
process involves
- creating classes that define objects and their behavior.
- creating objects from class definitions,
- establishing communications among objects.
By:-Gourav Kottawar
Benefits of oops
3/10/2016
35
 Through inheritance, we can eliminate redundant code
extend the use of existing Classes.
 We can build programs from the standard working
modules that communicate with one another, rather than
having to start writing the code from scratch. This leads
to saving of development time and higher productivity.
 • The principle of data hiding helps the programmer to
build secure program that can not be invaded by code in
other parts of a programs.
 • It is possible to have multiple instances of an object to
co-exist without any interference.
By:-Gourav Kottawar
Benefits of oops
3/10/2016
36
 • It is possible to map object in the problem domain to
those in the program.
 • It is easy to partition the work in a project based on
objects.
 • The data-centered design approach enables us to
capture more detail of a model
 can implemental form.
 • Object-oriented system can be easily upgraded from
small to large system.
 • Message passing techniques for communication
between objects makes to
 interface descriptions with external systems much
simpler.
 • Software complexity can be easily managedBy:-Gourav Kottawar
Objects Oriented languages
3/10/2016
37
 ABAP
 Ada 95
 Amiga
E
 BETA
 Blue
 Boo
 C++
 C#
 Chapel
 Clarion
 CLU
 COBO
L
Falcon
Fancy
Fortran
2003
FPr
FreeBAS
IC
F-Script
F#
Gambas
Graphtal
k
IDLscript
J
J#
JADE
Java
Groo
vy
Join
Java
X10
Lasso
Lava
Lexico
Lingo
LISP
Logtalk
MATLAB
Modula-2
Modu
la-3
Nemerle
NetRexx
Noop
Oberon
(Oberon-
1)
Obero
n-2
Object
Pascal
Delphi
Free
Pasca
l
Turbo
Pasca
l
Object
REXX
Cobra
ColdFusion
Common
Lisp
COOL
CorbaScript
Curl
D
Dylan
E
Eiffel Sather
Omnis
Studio
Oz
Mozart
Progra
mming
System
Perl since
Power
Builder
Prototype-
based
languages
Actor-
Based
Concur
rent
Langua
ges:
ABCL/1
,
ABCL/
R,
ABCL/
R2,
ABCL/c
+
By:-Gourav Kottawar
Object based languages
3/10/2016
38
 Examples of a language that is object-based
but not object-oriented are early versions of
Ada, Javascript, and Visual Basic (VB). These
languages all support the definition of an
object as a data structure but lack
polymorphism and inheritance.
By:-Gourav Kottawar

More Related Content

What's hot (20)

PPTX
Java(Polymorphism)
harsh kothari
 
PPTX
Functions in python slide share
Devashish Kumar
 
PDF
Java Presentation For Syntax
PravinYalameli
 
PPTX
Inheritance in JAVA PPT
Pooja Jaiswal
 
PPTX
Branching statements
ArunMK17
 
PPTX
Java package
CS_GDRCST
 
PPTX
Constructor in java
Pavith Gunasekara
 
PPTX
Java script
Prarthan P
 
PPTX
Inheritance in java
RahulAnanda1
 
PPTX
OOPS Basics With Example
Thooyavan Venkatachalam
 
PPT
Java oops and fundamentals
javaease
 
PPTX
Inheritance in oops
Hirra Sultan
 
PPT
Basic concept of OOP's
Prof. Dr. K. Adisesha
 
PPTX
Method overloading
Lovely Professional University
 
PPT
Decision making and branching
Hossain Md Shakhawat
 
PPTX
Operators in java
AbhishekMondal42
 
PPS
String and string buffer
kamal kotecha
 
PPTX
Java program structure
Mukund Kumar Bharti
 
PPT
Object and class relationships
Pooja mittal
 
PDF
03 function overloading
Jasleen Kaur (Chandigarh University)
 
Java(Polymorphism)
harsh kothari
 
Functions in python slide share
Devashish Kumar
 
Java Presentation For Syntax
PravinYalameli
 
Inheritance in JAVA PPT
Pooja Jaiswal
 
Branching statements
ArunMK17
 
Java package
CS_GDRCST
 
Constructor in java
Pavith Gunasekara
 
Java script
Prarthan P
 
Inheritance in java
RahulAnanda1
 
OOPS Basics With Example
Thooyavan Venkatachalam
 
Java oops and fundamentals
javaease
 
Inheritance in oops
Hirra Sultan
 
Basic concept of OOP's
Prof. Dr. K. Adisesha
 
Method overloading
Lovely Professional University
 
Decision making and branching
Hossain Md Shakhawat
 
Operators in java
AbhishekMondal42
 
String and string buffer
kamal kotecha
 
Java program structure
Mukund Kumar Bharti
 
Object and class relationships
Pooja mittal
 
03 function overloading
Jasleen Kaur (Chandigarh University)
 

Viewers also liked (20)

PDF
Lecture 11 bitwise_operator
eShikshak
 
PPT
3) web development
techbed
 
PPT
7) packaging and deployment
techbed
 
PPT
Inheritance C#
Raghuveer Guthikonda
 
PPT
Web Applications and Deployment
BG Java EE Course
 
PPT
Parm
parmsidhu
 
PPT
Bitwise operators
Puneet Rajput
 
PPTX
Array and string
prashant chelani
 
PPT
WebLogic Deployment Plan Example
James Bayer
 
PPTX
Graphics in C programming
Kamal Acharya
 
PPTX
Inheritance, friend function, virtual function, polymorphism
Jawad Khan
 
PPT
Structures
archikabhatia
 
PPT
Lec 42.43 - virtual.functions
Princess Sam
 
PDF
15 bitwise operators
Ravindra Rathore
 
PPT
C++ Language
Syed Zaid Irshad
 
DOCX
Virtual function
harman kaur
 
PPTX
Functions in C
Shobhit Upadhyay
 
PPT
Embedded c programming22 for fdp
Pradeep Kumar TS
 
PDF
Constructors and Destructors
Dr Sukhpal Singh Gill
 
PPTX
C pointer
University of Potsdam
 
Lecture 11 bitwise_operator
eShikshak
 
3) web development
techbed
 
7) packaging and deployment
techbed
 
Inheritance C#
Raghuveer Guthikonda
 
Web Applications and Deployment
BG Java EE Course
 
Parm
parmsidhu
 
Bitwise operators
Puneet Rajput
 
Array and string
prashant chelani
 
WebLogic Deployment Plan Example
James Bayer
 
Graphics in C programming
Kamal Acharya
 
Inheritance, friend function, virtual function, polymorphism
Jawad Khan
 
Structures
archikabhatia
 
Lec 42.43 - virtual.functions
Princess Sam
 
15 bitwise operators
Ravindra Rathore
 
C++ Language
Syed Zaid Irshad
 
Virtual function
harman kaur
 
Functions in C
Shobhit Upadhyay
 
Embedded c programming22 for fdp
Pradeep Kumar TS
 
Constructors and Destructors
Dr Sukhpal Singh Gill
 
Ad

Similar to principle of oop’s in cpp (20)

PPTX
IET307 OOP - object oriented programming concepts.pptx
BasithAb2
 
DOC
Introduction to OOPs Concept- Features, Basic concepts, Benefits and Applicat...
KrishnaveniT8
 
PDF
C++ chapter 1
jasvinder162
 
PPTX
OOP.pptx
kalyanibedekar
 
PDF
UNIT1- OBJECT ORIENTED PROGRAMMING IN JAVA- AIML IT-SPPU
ApurvaLaddha
 
PPTX
POP vs OOP Introduction
Hashni T
 
PDF
object oriented programming concepts and explanation
SATYA136395
 
PPTX
chapterOne.pptxFSdgfqdzwwfagxgghvkjljhcxCZZXvcbx
berihun18
 
PPT
Programming In C++
shammi mehra
 
PDF
OOP ppt.pdf
ArpitaJana28
 
PDF
Object oriented concepts
Pranali Chaudhari
 
PPTX
Presentation c
Kunal Sharma
 
PPTX
Ch 1 Introduction to Object Oriented Programming.pptx
MahiDivya
 
PPTX
Object Oriented Programming using C++.pptx
parveen837153
 
PDF
Computer_Programming_Part_II_Segment_01.pdf
et243047
 
DOC
Chapter1
jammiashok123
 
PPTX
Unit 1 OOSE
ChhayaShelake
 
PDF
Oop basic overview
Deborah Akuoko
 
PPTX
Principles of OOPs.pptx
LakshyaChauhan21
 
PPTX
CPP_,module2_1.pptx
AbhilashTom4
 
IET307 OOP - object oriented programming concepts.pptx
BasithAb2
 
Introduction to OOPs Concept- Features, Basic concepts, Benefits and Applicat...
KrishnaveniT8
 
C++ chapter 1
jasvinder162
 
OOP.pptx
kalyanibedekar
 
UNIT1- OBJECT ORIENTED PROGRAMMING IN JAVA- AIML IT-SPPU
ApurvaLaddha
 
POP vs OOP Introduction
Hashni T
 
object oriented programming concepts and explanation
SATYA136395
 
chapterOne.pptxFSdgfqdzwwfagxgghvkjljhcxCZZXvcbx
berihun18
 
Programming In C++
shammi mehra
 
OOP ppt.pdf
ArpitaJana28
 
Object oriented concepts
Pranali Chaudhari
 
Presentation c
Kunal Sharma
 
Ch 1 Introduction to Object Oriented Programming.pptx
MahiDivya
 
Object Oriented Programming using C++.pptx
parveen837153
 
Computer_Programming_Part_II_Segment_01.pdf
et243047
 
Chapter1
jammiashok123
 
Unit 1 OOSE
ChhayaShelake
 
Oop basic overview
Deborah Akuoko
 
Principles of OOPs.pptx
LakshyaChauhan21
 
CPP_,module2_1.pptx
AbhilashTom4
 
Ad

More from gourav kottawar (20)

PPTX
operator overloading & type conversion in cpp
gourav kottawar
 
PPTX
constructor & destructor in cpp
gourav kottawar
 
PPTX
classes & objects in cpp
gourav kottawar
 
PPTX
expression in cpp
gourav kottawar
 
PPTX
basics of c++
gourav kottawar
 
PPT
working file handling in cpp overview
gourav kottawar
 
PPT
pointers, virtual functions and polymorphisms in c++ || in cpp
gourav kottawar
 
PPTX
exception handling in cpp
gourav kottawar
 
PPT
cpp input & output system basics
gourav kottawar
 
PPTX
operator overloading & type conversion in cpp over view || c++
gourav kottawar
 
PPTX
constructor & destructor in cpp
gourav kottawar
 
PPTX
basics of c++
gourav kottawar
 
PPTX
classes & objects in cpp overview
gourav kottawar
 
PPTX
expression in cpp
gourav kottawar
 
PPT
SQL || overview and detailed information about Sql
gourav kottawar
 
PPT
SQL querys in detail || Sql query slides
gourav kottawar
 
PPT
Rrelational algebra in dbms overview
gourav kottawar
 
PPT
overview of database concept
gourav kottawar
 
PPT
Relational Model in dbms & sql database
gourav kottawar
 
PPTX
DBMS information in detail || Dbms (lab) ppt
gourav kottawar
 
operator overloading & type conversion in cpp
gourav kottawar
 
constructor & destructor in cpp
gourav kottawar
 
classes & objects in cpp
gourav kottawar
 
expression in cpp
gourav kottawar
 
basics of c++
gourav kottawar
 
working file handling in cpp overview
gourav kottawar
 
pointers, virtual functions and polymorphisms in c++ || in cpp
gourav kottawar
 
exception handling in cpp
gourav kottawar
 
cpp input & output system basics
gourav kottawar
 
operator overloading & type conversion in cpp over view || c++
gourav kottawar
 
constructor & destructor in cpp
gourav kottawar
 
basics of c++
gourav kottawar
 
classes & objects in cpp overview
gourav kottawar
 
expression in cpp
gourav kottawar
 
SQL || overview and detailed information about Sql
gourav kottawar
 
SQL querys in detail || Sql query slides
gourav kottawar
 
Rrelational algebra in dbms overview
gourav kottawar
 
overview of database concept
gourav kottawar
 
Relational Model in dbms & sql database
gourav kottawar
 
DBMS information in detail || Dbms (lab) ppt
gourav kottawar
 

Recently uploaded (20)

PDF
The History of Phone Numbers in Stoke Newington by Billy Thomas
History of Stoke Newington
 
PPTX
How to Set Up Tags in Odoo 18 - Odoo Slides
Celine George
 
PDF
Is Assignment Help Legal in Australia_.pdf
thomas19williams83
 
PPTX
CATEGORIES OF NURSING PERSONNEL: HOSPITAL & COLLEGE
PRADEEP ABOTHU
 
PDF
Week 2 - Irish Natural Heritage Powerpoint.pdf
swainealan
 
PDF
Exploring the Different Types of Experimental Research
Thelma Villaflores
 
PDF
epi editorial commitee meeting presentation
MIPLM
 
PPTX
Introduction to Biochemistry & Cellular Foundations.pptx
marvinnbustamante1
 
PDF
Reconstruct, Restore, Reimagine: New Perspectives on Stoke Newington’s Histor...
History of Stoke Newington
 
PDF
Characteristics, Strengths and Weaknesses of Quantitative Research.pdf
Thelma Villaflores
 
PPTX
DAY 1_QUARTER1 ENGLISH 5 WEEK- PRESENTATION.pptx
BanyMacalintal
 
PDF
AI-Powered-Visual-Storytelling-for-Nonprofits.pdf
TechSoup
 
PDF
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
PPTX
Post Dated Cheque(PDC) Management in Odoo 18
Celine George
 
PPTX
How to Create Odoo JS Dialog_Popup in Odoo 18
Celine George
 
PDF
STATEMENT-BY-THE-HON.-MINISTER-FOR-HEALTH-ON-THE-COVID-19-OUTBREAK-AT-UG_revi...
nservice241
 
PPTX
How to Send Email From Odoo 18 Website - Odoo Slides
Celine George
 
PPTX
How to Manage Allocation Report for Manufacturing Orders in Odoo 18
Celine George
 
PPTX
How to Configure Re-Ordering From Portal in Odoo 18 Website
Celine George
 
PPTX
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
The History of Phone Numbers in Stoke Newington by Billy Thomas
History of Stoke Newington
 
How to Set Up Tags in Odoo 18 - Odoo Slides
Celine George
 
Is Assignment Help Legal in Australia_.pdf
thomas19williams83
 
CATEGORIES OF NURSING PERSONNEL: HOSPITAL & COLLEGE
PRADEEP ABOTHU
 
Week 2 - Irish Natural Heritage Powerpoint.pdf
swainealan
 
Exploring the Different Types of Experimental Research
Thelma Villaflores
 
epi editorial commitee meeting presentation
MIPLM
 
Introduction to Biochemistry & Cellular Foundations.pptx
marvinnbustamante1
 
Reconstruct, Restore, Reimagine: New Perspectives on Stoke Newington’s Histor...
History of Stoke Newington
 
Characteristics, Strengths and Weaknesses of Quantitative Research.pdf
Thelma Villaflores
 
DAY 1_QUARTER1 ENGLISH 5 WEEK- PRESENTATION.pptx
BanyMacalintal
 
AI-Powered-Visual-Storytelling-for-Nonprofits.pdf
TechSoup
 
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
Post Dated Cheque(PDC) Management in Odoo 18
Celine George
 
How to Create Odoo JS Dialog_Popup in Odoo 18
Celine George
 
STATEMENT-BY-THE-HON.-MINISTER-FOR-HEALTH-ON-THE-COVID-19-OUTBREAK-AT-UG_revi...
nservice241
 
How to Send Email From Odoo 18 Website - Odoo Slides
Celine George
 
How to Manage Allocation Report for Manufacturing Orders in Odoo 18
Celine George
 
How to Configure Re-Ordering From Portal in Odoo 18 Website
Celine George
 
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 

principle of oop’s in cpp

  • 1. PRINCIPLE OF OOP’S Chap 13/10/2016 1By:-Gourav Kottawar By:-Gourav Kottawar
  • 2. Contents 3/10/2016 2  1.1 Introduction  1.2 Procedural Vs Object Oriented Programming  1.3 Classes, Object, Data Abstraction,  1.4 Encapsulation, Inheritance, Polymorphism  1.5 Dynamic Binding, Message Passing  1.6 Object Oriented Languages  1.7 Object Based languages % - 5 By:-Gourav Kottawar
  • 3. 1.1 Introduction 3/10/2016 3  C is a programming language developed in the 1970's alongside the UNIX operating system.  C provides a comprehensive set of features for handling a wide variety of applications, such as systems development and scientific computation.  C++ is an “extension” of the C language, in that most C programs are also C++ programs.  C++, as opposed to C, supports “object- oriented programming.” By:-Gourav Kottawar
  • 4. Principles of Object oriented programming 3/10/2016 4  Software Crisis 1. Real life problems 2. designing system with open interface 3. Reusability and extensibility 4. quality 5. Time schedule 6. Industrialize SDP. By:-Gourav Kottawar
  • 5. Layers of computer software 3/10/2016 5 Object Oriented Programming Procedure Oriented Assembly Language Machine Languag e 1.0 By:-Gourav Kottawar
  • 6. Typical structure of Procedure oriented programming 3/10/2016 6 By:-Gourav Kottawar
  • 7. 1.2 Procedural Vs Object Oriented Programming 3/10/2016 7 Procedure Oriented Programming Object Oriented Programming Divided Into In POP, program is divided into small parts called functions. In OOP, program is divided into parts called objects. Importance In POP,Importance is not given to data but to functions as well as sequence of actions to be done. In OOP, Importance is given to the data rather than procedures or functions because it works as areal world. Approach POP follows Top Down approach. OOP follows Bottom Up approach. Access Specifiers POP does not have any access specifier. OOP has access specifiers named Public, Private, Protected, etc. Data Moving In POP, Data can move freely from function to function in the system. In OOP, objects can move and communicate with each other through member functions.By:-Gourav Kottawar
  • 8. 1.2 Procedural Vs Object Oriented Programming 3/10/2016 8 Procedure Oriented Programming Object Oriented Programming Expansion To add new data and function in POP is not so easy. OOP provides an easy way to add new data and function. Data Access In POP, Most function uses Global data for sharing that can be accessed freely from function to function in the system. In OOP, data can not move easily from function to function,it can be kept public or private so we can control the access of data. Data Hiding POP does not have any proper way for hiding data so it is less secure. OOP provides Data Hiding so provides more security. Overloading In POP, Overloading is not possible. In OOP, overloading is possible in the form of Function Overloading and Operator Overloading. Examples Example of POP are : C, VB, FORTRAN, Pascal. Example of OOP are : C++, JAVA, VB.NET, C#.NET.By:-Gourav Kottawar
  • 9. Object Oriented paradigm 3/10/2016 9  Emphasis is data rather than procedure.  Programs are divided into what are known as objects.  Data structures are designed such that they characterize the objects.  Functions that operate on the data of an object are tied together in the data structure.  Data is hidden and cannot be accessed by external functions.  Objects may communicate with each other through functions.  New data and functions can be easily added whenever necessary.  Follows bottom up approach By:-Gourav Kottawar
  • 10. Organization of data and functions in oop 3/10/2016 10 By:-Gourav Kottawar
  • 11. Basic concepts of object oriented programming 3/10/2016 11  Object objects are runtime entities in an object oriented system. An object is anything that can be represented by data in a computer’s memory and manipulated by a computer program. By:-Gourav Kottawar
  • 17. 3/10/2016 Object-Oriented Programming An object can be something in the physical world or even just an abstract idea. An airplane, for example, is a physical object that can be manipulated by a computer. 17
  • 18. 3/10/2016 Object-Oriented Programming An object can be something in the physical world or even just an abstract idea. A bank transaction is an example of an object that is not physical. 18
  • 19. Object-Oriented Programming To a computer, an object is simply something that can be represented by data in the computer’s memory and manipulated by computer programs. 3/10/2016 19
  • 20. Object-Oriented Programming The data that represent the object are organized into a set of properties. The values stored in an object’s properties at any one time form the state of an object. Name: PA 3794 Owner: US Airlines Location: 39 52′ 06″ N 75 13′ 52″ W Heading: 271° Altitude: 19 m AirSpeed: 0 Make: Boeing Model: 737 Weight: 32,820 kg 3/10/2016 20
  • 21. 3/10/2016 21 Two ways of representing an object By:-Gourav Kottawar
  • 22. Classes 3/10/2016 22  The entire set of data and code of an object can be made a user defined data type with the help of a class.  Objects are variables of the type class.  Once a class has been defined, we can create any number of objects belonging to that class.  A class in collection of similar type objects. By:-Gourav Kottawar
  • 23. Object-Oriented Programming Each copy of an object from a particular class is called an instance of the object. 3/10/2016 23
  • 24. Object-Oriented Programming The act of creating a new instance of an object is called instantiation. 3/10/2016 24
  • 25. Object-Oriented Programming A class can be thought of as a blueprint for instances of an object. 3/10/2016 25
  • 26. Object-Oriented Programming Two different instances of the same class will have the same properties, but different values stored in those properties. 3/10/2016 26
  • 27. psulation 27  The wrapping up of data and function into a single unit (called class) is known as encapsulation.  Data and encapsulation is the most striking feature of a class.  The data is not accessible to the outside world, and only those functions which are wrapped in the class can access it.  These functions provide the interface between the object’s data and the program.  This insulation of the data from direct access by the program is called data hiding or information hiding. 3/10/2016By:-Gourav Kottawar
  • 28. Abstraction 3/10/2016 28  Abstraction refers to the act of representing essential features without including the  background details or explanation. Classes use the concept of abstraction and are defined  as a list of abstract attributes such as size, wait, and cost, and function operate on these  attributes. They encapsulate all the essential properties of the object that are to be created. The attributes are some time called data members because they hold information. The  functions that operate on these data are sometimes called methods or member function By:-Gourav Kottawar
  • 30. Inheritance 3/10/2016 30  Inheritance is the process by which objects of one class acquired the properties of objects of another classes.  It supports the concept of hierarchical classification. By:-Gourav Kottawar
  • 31. Polymorphism 3/10/2016 31  Polymorphism is another important OOP concept. Polymorphism, a Greek term, means the ability to take more than on form.  An operation may exhibit different behavior is different instances. The behavior depends upon the types of data used in the operation.  For example, consider the operation of addition.  For two numbers, the operation will generate a sum.  If the operands are strings, then the operation would produce a third string by concatenation. The process of making an operator to exhibit different behaviors in different instances is known as operator overloading. By:-Gourav Kottawar
  • 32. 3/10/2016 32  Polymorphism plays an important role in allowing objects having different internal structures to share the same external interface.  Polymorphism is extensively used in implementing inheritance. By:-Gourav Kottawar
  • 33. Dynamic binding 3/10/2016 33  Binding refers to the linking of a procedure call to the code to be executed in response to the call.  Dynamic binding means that the code associated with a given procedure call is not known until the time of the call at run time.  It is associated with polymorphism and inheritance.  A function call associated with a polymorphic reference depends on the dynamic type of that reference. By:-Gourav Kottawar
  • 34. Message binding 3/10/2016 34  An object oriented program consists a set of objects that communicate with each other. The process involves - creating classes that define objects and their behavior. - creating objects from class definitions, - establishing communications among objects. By:-Gourav Kottawar
  • 35. Benefits of oops 3/10/2016 35  Through inheritance, we can eliminate redundant code extend the use of existing Classes.  We can build programs from the standard working modules that communicate with one another, rather than having to start writing the code from scratch. This leads to saving of development time and higher productivity.  • The principle of data hiding helps the programmer to build secure program that can not be invaded by code in other parts of a programs.  • It is possible to have multiple instances of an object to co-exist without any interference. By:-Gourav Kottawar
  • 36. Benefits of oops 3/10/2016 36  • It is possible to map object in the problem domain to those in the program.  • It is easy to partition the work in a project based on objects.  • The data-centered design approach enables us to capture more detail of a model  can implemental form.  • Object-oriented system can be easily upgraded from small to large system.  • Message passing techniques for communication between objects makes to  interface descriptions with external systems much simpler.  • Software complexity can be easily managedBy:-Gourav Kottawar
  • 37. Objects Oriented languages 3/10/2016 37  ABAP  Ada 95  Amiga E  BETA  Blue  Boo  C++  C#  Chapel  Clarion  CLU  COBO L Falcon Fancy Fortran 2003 FPr FreeBAS IC F-Script F# Gambas Graphtal k IDLscript J J# JADE Java Groo vy Join Java X10 Lasso Lava Lexico Lingo LISP Logtalk MATLAB Modula-2 Modu la-3 Nemerle NetRexx Noop Oberon (Oberon- 1) Obero n-2 Object Pascal Delphi Free Pasca l Turbo Pasca l Object REXX Cobra ColdFusion Common Lisp COOL CorbaScript Curl D Dylan E Eiffel Sather Omnis Studio Oz Mozart Progra mming System Perl since Power Builder Prototype- based languages Actor- Based Concur rent Langua ges: ABCL/1 , ABCL/ R, ABCL/ R2, ABCL/c + By:-Gourav Kottawar
  • 38. Object based languages 3/10/2016 38  Examples of a language that is object-based but not object-oriented are early versions of Ada, Javascript, and Visual Basic (VB). These languages all support the definition of an object as a data structure but lack polymorphism and inheritance. By:-Gourav Kottawar