SlideShare a Scribd company logo
1 of 27
WEL COME
PRAVEEN M JIGAJINNI
PGT (Computer Science)
MTech[IT],MPhil (Comp.Sci), MCA, MSc[IT], PGDCA, ADCA,
Dc. Sc. & Engg.
email: praveenkumarjigajinni@yahoo.co.in
CHAPTER 2
OBJECT ORIENTED
PROGRAMMING
3
INTRODUCTION
This chapter begins with brief discussion of
various Programming paradigms that C++
supports i.e., procedural programming style, object
based programming style and object oriented
programming style. This is followed by detailed
discussion of object oriented programming and
its implementation. All this shall help you
appreciate OOP style and its advantages over
other programming methodologies.
What is a Programming Paradigm
A Programming Paradigm defines the
methodology of designing and
implementing programs using the key
features and building blocks of a
programming language.
What is a Programming Paradigm
Procedural Programming
Procedural programming paradigm separates the
functions and the data manipulated by them.
This leads to many problems when it comes to
extending the software or maintaining the
software.
 Procedural Programming is susceptible to
design changes.
 Procedural Programming leads to increase
time and cost overheads during design
changes.
6
Object Based Programming
Object based programming is a newer
paradigm that implements some features
of object oriented programming but not
all. In object based programming, data and
its associated meaningful functions are
enclosed in one single entity a class.
Classes enforce information hiding and
abstraction thereby separating the
implementation details and the uses
interface.
7
[For instance, you can consider a calculator,
its interface would include a small display
screen and a few buttons that is available
to the user and implementation details i.e.
how actual calculations are taking place
are hidden from user.]
Object based programming localizes the
implementation details.
Object based programming is subject of Object
Oriented programming.
Advantages of Object Based
Programming
i. It overcomes most shortcomings of
procedural programming,
ii. It localizes changes and hides
implementation details from user,
iii. It supports user-defined types,
iv. Implements information hiding and
abstraction etc.
Limitations
However, object based programming suffers
from a major limitation and that is its
inability to represent real world
relationships that exist among object.
For example, both car and truck are
vehicles. This can not be represented in
object based programming as it does not
support inheritance.
Object Oriented Programming
The object oriented programming paradigm is
superset of object based programming. It
offers all the features of object based
programming and overcomes its limitation
by implementing inheritance.
What is an OBJECT ?
Object is an identifiable entity with some
characteristics and behaviour.
What is a CLASS ?
A class is a group of objects that share
common properties and relationships.
Function 1
Function 2
Function 3
Data 1
Data 2
All data is openly available to
all functions in the program
Properties
Behaviour
Properties
Behaviour
Object 1 Object 2
Data and functions enclosed
within objects. New objects
communicate with one another.
BASIC CONCEPTS OF OOP
These general concepts of OOP are given
below:
Data Abstraction
Data Encapsulation
Modularity
Inheritance
Polymorphism
Data Abstraction
Abstraction refers to the act of
representing essential features without
including the background details or
explanations.
What is encapsulation ?
The wrapping up of data and operations /
functions (that operate on the data) into a
single unit (called class) is known as
Encapsulation.
Data
Member
Functions
Data
Member
Functions
Data
Member
Functions
Object
Object Object
Modularity
The act of partitioning a program into
individual components is called
modularity. The justification for
partitioning a program is that
• it reduces its complexity to some degree
and
• it creates a number of well-defined,
documented boundaries within the
program
What is a Modularity ?
Modularity is the property of a system that
has been decomposed into a set of
cohesive and loosely coupled modules.
Inheritance
Inheritance is the capability of one class of
things to inherit capabilities or properties
from another class.
Vehicles
Automobiles
(Motor driven)
Pulled
Vehicles
Car Bus Cart Rickshaw
Property Inheritance
Polymorphism
Polymorphism is the ability for a message
or data to be processed in more than one
form.
Circle
Area (circle)
Rectangle
Area (rectangle)
Shape
Area
Triangle
Area (triangle)
Polymorphism
ADVANTAGES of OOP
1. Re-use of code.
2. Ease of comprehension.
3. Ease of fabrication and maintenance.
4. Easy redesign and extension.
25
DISADVANTAGES of OOP
a) With OOP, classes tend be overly generalized.
b) The relations among classes become artificial at
times.
c) The OOP programs’ design is tricky.
d) Also one need to do proper planning and proper
design for OOP programming.
e) To program with OOP, programmer need proper
skills such as design skills, programming skills,
thinking in terms of objects etc.
?Any Questions Please
Thank You
Very Much

More Related Content

What's hot

Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programmingAmit Soni (CTFL)
 
C++ OOPS Concept
C++ OOPS ConceptC++ OOPS Concept
C++ OOPS ConceptBoopathi K
 
Types of Constructor in C++
Types of Constructor in C++Types of Constructor in C++
Types of Constructor in C++Bhavik Vashi
 
Datatypes in python
Datatypes in pythonDatatypes in python
Datatypes in pythoneShikshak
 
Object Oriented Programming Using C++
Object Oriented Programming Using C++Object Oriented Programming Using C++
Object Oriented Programming Using C++Muhammad Waqas
 
Data types in python
Data types in pythonData types in python
Data types in pythonRaginiJain21
 
Object oriented programming c++
Object oriented programming c++Object oriented programming c++
Object oriented programming c++Ankur Pandey
 
File handling in Python
File handling in PythonFile handling in Python
File handling in PythonMegha V
 
Python variables and data types.pptx
Python variables and data types.pptxPython variables and data types.pptx
Python variables and data types.pptxAkshayAggarwal79
 
Introduction to oop
Introduction to oopIntroduction to oop
Introduction to oopcolleges
 
Inheritance in c++
Inheritance in c++Inheritance in c++
Inheritance in c++Vineeta Garg
 

What's hot (20)

Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 
Data types in c++
Data types in c++Data types in c++
Data types in c++
 
C++ OOPS Concept
C++ OOPS ConceptC++ OOPS Concept
C++ OOPS Concept
 
Object-oriented concepts
Object-oriented conceptsObject-oriented concepts
Object-oriented concepts
 
History of java'
History of java'History of java'
History of java'
 
[OOP - Lec 01] Introduction to OOP
[OOP - Lec 01] Introduction to OOP[OOP - Lec 01] Introduction to OOP
[OOP - Lec 01] Introduction to OOP
 
Types of Constructor in C++
Types of Constructor in C++Types of Constructor in C++
Types of Constructor in C++
 
Basic concept of OOP's
Basic concept of OOP'sBasic concept of OOP's
Basic concept of OOP's
 
Datatypes in python
Datatypes in pythonDatatypes in python
Datatypes in python
 
Object Oriented Programming Using C++
Object Oriented Programming Using C++Object Oriented Programming Using C++
Object Oriented Programming Using C++
 
Data types in python
Data types in pythonData types in python
Data types in python
 
Object oriented programming c++
Object oriented programming c++Object oriented programming c++
Object oriented programming c++
 
Chapter 03 python libraries
Chapter 03 python librariesChapter 03 python libraries
Chapter 03 python libraries
 
Introduction to c++ ppt 1
Introduction to c++ ppt 1Introduction to c++ ppt 1
Introduction to c++ ppt 1
 
Data types in java
Data types in javaData types in java
Data types in java
 
File handling in Python
File handling in PythonFile handling in Python
File handling in Python
 
C by balaguruswami - e.balagurusamy
C   by balaguruswami - e.balagurusamyC   by balaguruswami - e.balagurusamy
C by balaguruswami - e.balagurusamy
 
Python variables and data types.pptx
Python variables and data types.pptxPython variables and data types.pptx
Python variables and data types.pptx
 
Introduction to oop
Introduction to oopIntroduction to oop
Introduction to oop
 
Inheritance in c++
Inheritance in c++Inheritance in c++
Inheritance in c++
 

Viewers also liked

Rousseau
RousseauRousseau
RousseauJenni28
 
¿Porque migrar a IBM Lotus Domino R8?
¿Porque migrar a IBM Lotus Domino R8?¿Porque migrar a IBM Lotus Domino R8?
¿Porque migrar a IBM Lotus Domino R8?IT Factory S.R.L
 
5 trastorno
5 trastorno5 trastorno
5 trastornoksamara
 
Avaliação econômica e_social__cinthia_cabral(1)
Avaliação econômica e_social__cinthia_cabral(1)Avaliação econômica e_social__cinthia_cabral(1)
Avaliação econômica e_social__cinthia_cabral(1)João Siqueira da Mata
 
Preparação e Diluição de Soluções
Preparação e Diluição de SoluçõesPreparação e Diluição de Soluções
Preparação e Diluição de SoluçõesRuben Almeida
 
1ª Aula Bioquimica - http://bio-quimica.blogspot.com
1ª Aula Bioquimica - http://bio-quimica.blogspot.com1ª Aula Bioquimica - http://bio-quimica.blogspot.com
1ª Aula Bioquimica - http://bio-quimica.blogspot.comJulio Dutra
 
Power Up Your Agile Planning and Analysis: Deliver Value Via Structured Conve...
Power Up Your Agile Planning and Analysis: Deliver Value Via Structured Conve...Power Up Your Agile Planning and Analysis: Deliver Value Via Structured Conve...
Power Up Your Agile Planning and Analysis: Deliver Value Via Structured Conve...EBG Consulting, Inc.
 
Hierarchical Object Oriented Design
Hierarchical Object Oriented DesignHierarchical Object Oriented Design
Hierarchical Object Oriented Designsahibsahib
 

Viewers also liked (14)

Rousseau
RousseauRousseau
Rousseau
 
Ejemplos podcast corporativo
Ejemplos podcast corporativoEjemplos podcast corporativo
Ejemplos podcast corporativo
 
Estar ahí...
Estar ahí...Estar ahí...
Estar ahí...
 
Acuarios
AcuariosAcuarios
Acuarios
 
¿Porque migrar a IBM Lotus Domino R8?
¿Porque migrar a IBM Lotus Domino R8?¿Porque migrar a IBM Lotus Domino R8?
¿Porque migrar a IBM Lotus Domino R8?
 
IQProtector Suite
IQProtector SuiteIQProtector Suite
IQProtector Suite
 
5 trastorno
5 trastorno5 trastorno
5 trastorno
 
Aromaimpulse
AromaimpulseAromaimpulse
Aromaimpulse
 
Avaliação econômica e_social__cinthia_cabral(1)
Avaliação econômica e_social__cinthia_cabral(1)Avaliação econômica e_social__cinthia_cabral(1)
Avaliação econômica e_social__cinthia_cabral(1)
 
Preparação e Diluição de Soluções
Preparação e Diluição de SoluçõesPreparação e Diluição de Soluções
Preparação e Diluição de Soluções
 
1ª Aula Bioquimica - http://bio-quimica.blogspot.com
1ª Aula Bioquimica - http://bio-quimica.blogspot.com1ª Aula Bioquimica - http://bio-quimica.blogspot.com
1ª Aula Bioquimica - http://bio-quimica.blogspot.com
 
Power Up Your Agile Planning and Analysis: Deliver Value Via Structured Conve...
Power Up Your Agile Planning and Analysis: Deliver Value Via Structured Conve...Power Up Your Agile Planning and Analysis: Deliver Value Via Structured Conve...
Power Up Your Agile Planning and Analysis: Deliver Value Via Structured Conve...
 
Reflective Teaching powerpoint mkdds
Reflective Teaching powerpoint mkddsReflective Teaching powerpoint mkdds
Reflective Teaching powerpoint mkdds
 
Hierarchical Object Oriented Design
Hierarchical Object Oriented DesignHierarchical Object Oriented Design
Hierarchical Object Oriented Design
 

Similar to 2 Object Oriented Programming

Programming In C++
Programming In C++ Programming In C++
Programming In C++ shammi mehra
 
Software_Engineering_Presentation (1).pptx
Software_Engineering_Presentation (1).pptxSoftware_Engineering_Presentation (1).pptx
Software_Engineering_Presentation (1).pptxArifaMehreen1
 
Bca 2nd sem u-1 iintroduction
Bca 2nd sem u-1 iintroductionBca 2nd sem u-1 iintroduction
Bca 2nd sem u-1 iintroductionRai University
 
Mca 2 sem u-1 iintroduction
Mca 2 sem u-1 iintroductionMca 2 sem u-1 iintroduction
Mca 2 sem u-1 iintroductionRai University
 
Object Oriented Programming using C++.pptx
Object Oriented Programming using C++.pptxObject Oriented Programming using C++.pptx
Object Oriented Programming using C++.pptxparveen837153
 
Object Oriented Programming Lecture Notes
Object Oriented Programming Lecture NotesObject Oriented Programming Lecture Notes
Object Oriented Programming Lecture NotesFellowBuddy.com
 
A Hand Book of Visual Basic 6.0.pdf.pdf
A Hand Book of Visual Basic 6.0.pdf.pdfA Hand Book of Visual Basic 6.0.pdf.pdf
A Hand Book of Visual Basic 6.0.pdf.pdfAnn Wera
 
Chapter 04 object oriented programming
Chapter 04 object oriented programmingChapter 04 object oriented programming
Chapter 04 object oriented programmingPraveen M Jigajinni
 
Introduction to object oriented language
Introduction to object oriented languageIntroduction to object oriented language
Introduction to object oriented languagefarhan amjad
 
Object Oriented Approach for Software Development
Object Oriented Approach for Software DevelopmentObject Oriented Approach for Software Development
Object Oriented Approach for Software DevelopmentRishabh Soni
 

Similar to 2 Object Oriented Programming (20)

Programming In C++
Programming In C++ Programming In C++
Programming In C++
 
OOPS_Unit_1
OOPS_Unit_1OOPS_Unit_1
OOPS_Unit_1
 
Software_Engineering_Presentation (1).pptx
Software_Engineering_Presentation (1).pptxSoftware_Engineering_Presentation (1).pptx
Software_Engineering_Presentation (1).pptx
 
OOP ppt.pdf
OOP ppt.pdfOOP ppt.pdf
OOP ppt.pdf
 
C++ notes.pdf
C++ notes.pdfC++ notes.pdf
C++ notes.pdf
 
Bca 2nd sem u-1 iintroduction
Bca 2nd sem u-1 iintroductionBca 2nd sem u-1 iintroduction
Bca 2nd sem u-1 iintroduction
 
Mca 2 sem u-1 iintroduction
Mca 2 sem u-1 iintroductionMca 2 sem u-1 iintroduction
Mca 2 sem u-1 iintroduction
 
Object Oriented Programming using C++.pptx
Object Oriented Programming using C++.pptxObject Oriented Programming using C++.pptx
Object Oriented Programming using C++.pptx
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 
OODJ-MODULE 1.pptx
OODJ-MODULE 1.pptxOODJ-MODULE 1.pptx
OODJ-MODULE 1.pptx
 
chapter-6-oops.pdf
chapter-6-oops.pdfchapter-6-oops.pdf
chapter-6-oops.pdf
 
OOP.pptx
OOP.pptxOOP.pptx
OOP.pptx
 
Object Oriented Programming Lecture Notes
Object Oriented Programming Lecture NotesObject Oriented Programming Lecture Notes
Object Oriented Programming Lecture Notes
 
A Hand Book of Visual Basic 6.0.pdf.pdf
A Hand Book of Visual Basic 6.0.pdf.pdfA Hand Book of Visual Basic 6.0.pdf.pdf
A Hand Book of Visual Basic 6.0.pdf.pdf
 
Chapter 04 object oriented programming
Chapter 04 object oriented programmingChapter 04 object oriented programming
Chapter 04 object oriented programming
 
OOP-1.pptx
OOP-1.pptxOOP-1.pptx
OOP-1.pptx
 
Oop obj c
Oop obj cOop obj c
Oop obj c
 
Introduction to object oriented language
Introduction to object oriented languageIntroduction to object oriented language
Introduction to object oriented language
 
Object Oriented Approach for Software Development
Object Oriented Approach for Software DevelopmentObject Oriented Approach for Software Development
Object Oriented Approach for Software Development
 
Unit v(dsc++)
Unit v(dsc++)Unit v(dsc++)
Unit v(dsc++)
 

More from Praveen M Jigajinni

Chapter 09 design and analysis of algorithms
Chapter 09  design and analysis of algorithmsChapter 09  design and analysis of algorithms
Chapter 09 design and analysis of algorithmsPraveen M Jigajinni
 
Chapter 06 constructors and destructors
Chapter 06 constructors and destructorsChapter 06 constructors and destructors
Chapter 06 constructors and destructorsPraveen M Jigajinni
 
Chapter 8 getting started with python
Chapter 8 getting started with pythonChapter 8 getting started with python
Chapter 8 getting started with pythonPraveen M Jigajinni
 
Chapter 7 basics of computational thinking
Chapter 7 basics of computational thinkingChapter 7 basics of computational thinking
Chapter 7 basics of computational thinkingPraveen M Jigajinni
 
Chapter 6 algorithms and flow charts
Chapter 6  algorithms and flow chartsChapter 6  algorithms and flow charts
Chapter 6 algorithms and flow chartsPraveen M Jigajinni
 
Chapter 3 cloud computing and intro parrallel computing
Chapter 3 cloud computing and intro parrallel computingChapter 3 cloud computing and intro parrallel computing
Chapter 3 cloud computing and intro parrallel computingPraveen M Jigajinni
 

More from Praveen M Jigajinni (20)

Chapter 09 design and analysis of algorithms
Chapter 09  design and analysis of algorithmsChapter 09  design and analysis of algorithms
Chapter 09 design and analysis of algorithms
 
Chapter 08 data file handling
Chapter 08 data file handlingChapter 08 data file handling
Chapter 08 data file handling
 
Chapter 07 inheritance
Chapter 07 inheritanceChapter 07 inheritance
Chapter 07 inheritance
 
Chapter 06 constructors and destructors
Chapter 06 constructors and destructorsChapter 06 constructors and destructors
Chapter 06 constructors and destructors
 
Chapter 05 classes and objects
Chapter 05 classes and objectsChapter 05 classes and objects
Chapter 05 classes and objects
 
Chapter 02 functions -class xii
Chapter 02   functions -class xiiChapter 02   functions -class xii
Chapter 02 functions -class xii
 
Unit 3 MongDB
Unit 3 MongDBUnit 3 MongDB
Unit 3 MongDB
 
Chapter 17 Tuples
Chapter 17 TuplesChapter 17 Tuples
Chapter 17 Tuples
 
Chapter 15 Lists
Chapter 15 ListsChapter 15 Lists
Chapter 15 Lists
 
Chapter 14 strings
Chapter 14 stringsChapter 14 strings
Chapter 14 strings
 
Chapter 13 exceptional handling
Chapter 13 exceptional handlingChapter 13 exceptional handling
Chapter 13 exceptional handling
 
Chapter 10 data handling
Chapter 10 data handlingChapter 10 data handling
Chapter 10 data handling
 
Chapter 9 python fundamentals
Chapter 9 python fundamentalsChapter 9 python fundamentals
Chapter 9 python fundamentals
 
Chapter 8 getting started with python
Chapter 8 getting started with pythonChapter 8 getting started with python
Chapter 8 getting started with python
 
Chapter 7 basics of computational thinking
Chapter 7 basics of computational thinkingChapter 7 basics of computational thinking
Chapter 7 basics of computational thinking
 
Chapter 6 algorithms and flow charts
Chapter 6  algorithms and flow chartsChapter 6  algorithms and flow charts
Chapter 6 algorithms and flow charts
 
Chapter 5 boolean algebra
Chapter 5 boolean algebraChapter 5 boolean algebra
Chapter 5 boolean algebra
 
Chapter 4 number system
Chapter 4 number systemChapter 4 number system
Chapter 4 number system
 
Chapter 3 cloud computing and intro parrallel computing
Chapter 3 cloud computing and intro parrallel computingChapter 3 cloud computing and intro parrallel computing
Chapter 3 cloud computing and intro parrallel computing
 
Chapter 2 operating systems
Chapter 2 operating systemsChapter 2 operating systems
Chapter 2 operating systems
 

Recently uploaded

Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupJonathanParaisoCruz
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 

Recently uploaded (20)

Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized Group
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 

2 Object Oriented Programming

  • 1. WEL COME PRAVEEN M JIGAJINNI PGT (Computer Science) MTech[IT],MPhil (Comp.Sci), MCA, MSc[IT], PGDCA, ADCA, Dc. Sc. & Engg. email: praveenkumarjigajinni@yahoo.co.in
  • 3. 3 INTRODUCTION This chapter begins with brief discussion of various Programming paradigms that C++ supports i.e., procedural programming style, object based programming style and object oriented programming style. This is followed by detailed discussion of object oriented programming and its implementation. All this shall help you appreciate OOP style and its advantages over other programming methodologies.
  • 4. What is a Programming Paradigm A Programming Paradigm defines the methodology of designing and implementing programs using the key features and building blocks of a programming language. What is a Programming Paradigm
  • 5. Procedural Programming Procedural programming paradigm separates the functions and the data manipulated by them. This leads to many problems when it comes to extending the software or maintaining the software.  Procedural Programming is susceptible to design changes.  Procedural Programming leads to increase time and cost overheads during design changes.
  • 6. 6 Object Based Programming Object based programming is a newer paradigm that implements some features of object oriented programming but not all. In object based programming, data and its associated meaningful functions are enclosed in one single entity a class. Classes enforce information hiding and abstraction thereby separating the implementation details and the uses interface.
  • 7. 7 [For instance, you can consider a calculator, its interface would include a small display screen and a few buttons that is available to the user and implementation details i.e. how actual calculations are taking place are hidden from user.]
  • 8. Object based programming localizes the implementation details. Object based programming is subject of Object Oriented programming.
  • 9. Advantages of Object Based Programming i. It overcomes most shortcomings of procedural programming, ii. It localizes changes and hides implementation details from user, iii. It supports user-defined types, iv. Implements information hiding and abstraction etc.
  • 10. Limitations However, object based programming suffers from a major limitation and that is its inability to represent real world relationships that exist among object. For example, both car and truck are vehicles. This can not be represented in object based programming as it does not support inheritance.
  • 11. Object Oriented Programming The object oriented programming paradigm is superset of object based programming. It offers all the features of object based programming and overcomes its limitation by implementing inheritance.
  • 12. What is an OBJECT ? Object is an identifiable entity with some characteristics and behaviour. What is a CLASS ? A class is a group of objects that share common properties and relationships.
  • 13. Function 1 Function 2 Function 3 Data 1 Data 2 All data is openly available to all functions in the program Properties Behaviour Properties Behaviour Object 1 Object 2 Data and functions enclosed within objects. New objects communicate with one another.
  • 14. BASIC CONCEPTS OF OOP These general concepts of OOP are given below: Data Abstraction Data Encapsulation Modularity Inheritance Polymorphism
  • 15. Data Abstraction Abstraction refers to the act of representing essential features without including the background details or explanations.
  • 16. What is encapsulation ? The wrapping up of data and operations / functions (that operate on the data) into a single unit (called class) is known as Encapsulation.
  • 18. Modularity The act of partitioning a program into individual components is called modularity. The justification for partitioning a program is that • it reduces its complexity to some degree and • it creates a number of well-defined, documented boundaries within the program
  • 19. What is a Modularity ? Modularity is the property of a system that has been decomposed into a set of cohesive and loosely coupled modules.
  • 20. Inheritance Inheritance is the capability of one class of things to inherit capabilities or properties from another class.
  • 22. Polymorphism Polymorphism is the ability for a message or data to be processed in more than one form.
  • 24. ADVANTAGES of OOP 1. Re-use of code. 2. Ease of comprehension. 3. Ease of fabrication and maintenance. 4. Easy redesign and extension.
  • 25. 25 DISADVANTAGES of OOP a) With OOP, classes tend be overly generalized. b) The relations among classes become artificial at times. c) The OOP programs’ design is tricky. d) Also one need to do proper planning and proper design for OOP programming. e) To program with OOP, programmer need proper skills such as design skills, programming skills, thinking in terms of objects etc.