SlideShare a Scribd company logo
3
Most read
4
Most read
7
Most read
OBJECT ORIENTED
PROGRAMMING
CONTENTS
Merits
and Demerits of object oriented
programming
04
Characteristics of object oriented language: classes and
objects.
encapsulation-data abstraction- inheritance -
polymorphism
Why object oriented
programming?
01
03
02
Why object
oriented
programming?
As the name suggests, Object-Oriented Programming or OOPs
refers to languages that uses objects in programming. Object-
oriented programming aims to implement real-world entities
like inheritance, hiding, polymorphism etc. in programming.
We can not apply OOP everywhere. It is applied only when it is
required. It is not suitable for all types of problems.
The main aim of OOP is to bind together the data and the
functions that operate on them so that no other part of the
code can access this data except that function.
Object Oriented programming (OOP) is a programming paradigm that
relies on the concept of classes and objects. It is used to structure a
software program into simple, reusable pieces of code blueprints
(usually called classes), which are used to create individual instances of
objects.
CLASSES
A class in C++ is the building block that leads to Object-
Oriented programming. It is a user-defined data type,
which holds its own data members and member
functions, which can be accessed and used by creating
an instance of that class. A C++ class is like a blueprint
for an object.
OBJECTS
An Object is an instance of a Class. When a class is
defined, no memory is allocated but when it is
instantiated (i.e. an object is created) memory is
allocated. Object can be created many times as per
requirement
// CLASS
class CAR{
public:
string color;
string model;
};
int main(){
// OBJECTS
CAR FORD;
FORD.color = "Green";
FORD.color = "Mustang";
CAR TOYTA;
TOYTA.color = "Red";
TOYTA.model = "Prius";
CAR VOLKSWAGEN;
VOLKSWAGEN.color = "Blue";
VOLKSWAGEN.model = "Golf";
PROGRAM
ENCAPSULATION
In object-oriented computer programming (OOP) languages, the
notion of encapsulation (or OOP Encapsulation) refers to the
bundling of data, along with the methods that operate on that data,
into a single unit. A class is a program-code-template that allows
developers to create an object that has both variables (data) and
behaviors (functions or methods). A class is an example of
encapsulation in computer science in that it consists of data and
methods that have been bundled into a single unit.
DATA ABSTRACTION
Abstraction means that the user interacts with only selected
attributes and methods of an object. Abstraction uses simplified,
high level tools, to access a complex object.
Abstraction is using simple classes to represent complexity.
Abstraction is an extension of encapsulation. For example, you don’t
have to know all the details of how the engine works to drive a car.
A driver only uses a small selection of tools: like gas pedal, brake,
steering wheel, blinker. The engineering is hidden from the driver.
Inheritance
Inheritance is the procedure in which one class inherits the
attributes and methods of another class. The class whose
properties and methods are inherited is known as the Parent class.
And the class that inherits the properties from the parent class is
the Child class.
For example, a child inherits the traits of his/her parents. With
inheritance, we can reuse the fields and methods of the existing
class. Hence, inheritance facilitates Reusability and is an important
concept of OOPs.
Polymorphism
A person at the same time can have different characteristics. Like a
man at the same time is a father, a husband, an employee. So the
same person possesses different behavior in different situations.
This is called polymorphism.
Polymorphism is considered one of the important features of
Object-Oriented Programming. Polymorphism allows us to
perform a single action in different ways. In other words,
polymorphism allows you to define one interface and have
multiple implementations.
Merits and Demerits of OOP
MERITS
•OOP language allows to break the program into the bit-sized problems that can be solved easily (one object at a
time).
•OOP systems can be easily upgraded from small to large systems.
•It is possible that multiple instances of objects co-exist without any interference,
•It is possible to map the objects in problem domain to those in the program.
•The principle of data hiding helps the programmer to build secure programs which cannot be invaded by the code in
other parts of the program.
•By using inheritance, we can eliminate redundant code and extend the use of existing classes.
•The data-centered design approach enables us to capture more details of model in an implementable form.
DEMERITS
•The length of the programs developed using OOP language is much larger than the procedural approach. Since the
program becomes larger in size, it requires more time to be executed that leads to slower execution of the program.
•We can not apply OOP everywhere as it is not a universal language. It is applied only when it is required. It is not
suitable for all types of problems.
•OOPs take time to get used to it. The thought process involved in object-oriented programming may not be natural
for some people.
•Everything is treated as object in OOP so before applying it we need to have excellent thinking in terms of objects.
CONCLUSION
Object Oriented programming requires
thinking about the structure of the program
and planning at the beginning of coding.
Looking at how to break up the
requirements into simple, reusable classes
that can be used to blueprint instances of
objects. Overall, implementing OOP allows
for better data structures and reusability,
saving time in the long run.
object oriented programming(oops)

More Related Content

PPTX
OOPS Basics With Example
PPTX
DYNAMIC MEMORY ALLOCATION.pptx
PPTX
Basics of Object Oriented Programming
PPT
Inheritance.ppt
PDF
Oops concepts || Object Oriented Programming Concepts in Java
PDF
Android Toast.pdf
PPTX
Advance oops concepts
OOPS Basics With Example
DYNAMIC MEMORY ALLOCATION.pptx
Basics of Object Oriented Programming
Inheritance.ppt
Oops concepts || Object Oriented Programming Concepts in Java
Android Toast.pdf
Advance oops concepts

What's hot (20)

PPT
Concepts In Object Oriented Programming Languages
PPTX
Chapter 05 classes and objects
PDF
C++ Files and Streams
PPTX
Functions in c++
PPT
Object oriented programming
PDF
DDBMS Paper with Solution
PPTX
Java abstract class & abstract methods
PPTX
Object Oriented Programming Using C++
PPTX
Filehandling
PPTX
Notification android
PPTX
[OOP - Lec 08] Encapsulation (Information Hiding)
PPTX
Operations on Processes
PPSX
Files in c++
PDF
file handling c++
PPT
Packages in java
PPTX
Unit 1 introduction to c++.pptx
PPTX
Inheritance in JAVA PPT
PDF
Fundamentals of data structures ellis horowitz & sartaj sahni
ODP
Function
PPTX
Operating system 18 process creation and termination
Concepts In Object Oriented Programming Languages
Chapter 05 classes and objects
C++ Files and Streams
Functions in c++
Object oriented programming
DDBMS Paper with Solution
Java abstract class & abstract methods
Object Oriented Programming Using C++
Filehandling
Notification android
[OOP - Lec 08] Encapsulation (Information Hiding)
Operations on Processes
Files in c++
file handling c++
Packages in java
Unit 1 introduction to c++.pptx
Inheritance in JAVA PPT
Fundamentals of data structures ellis horowitz & sartaj sahni
Function
Operating system 18 process creation and termination
Ad

Similar to object oriented programming(oops) (20)

PPTX
OOPsConceptspythonenineeringcomputerscienceand engineering.pptx
PDF
UNIT1- OBJECT ORIENTED PROGRAMMING IN JAVA- AIML IT-SPPU
PPTX
Object Oriented Programming using c++ main four piller in this
PPTX
Object Oriented Programming.pptx its a opps concept in c++ which is helpful
PPTX
Principles of OOPs.pptx
PPTX
Object oriented programming
PPT
Unit 1- Basic concept of object-oriented-programming.ppt
PPTX
Introduction to Object Oriented Programming.pptx
PPTX
oop.pptx
PPTX
Object Oriented Programming fundamentals.pptx
PPTX
Object Oriented Programming Language is an oop
PPTX
Characteristics-and-Advantages-of-Object-Oriented-Programming.pptx
PPTX
Principles and advantages of oop ppt
PPTX
Block_1_Unit- I.pdf bca learning for exam you
PPTX
Lesson 1 - Object Oriented Programming CPP103.pptx
PPTX
CPP-Unit 1.pptx
PDF
L1-Introduction to OOPs concepts.pdf
PPTX
Object Oriented Programming.pptx shiva
PPTX
Chapter 04 object oriented programming
PPTX
Rajib Ali Presentation on object oreitation oop.pptx
OOPsConceptspythonenineeringcomputerscienceand engineering.pptx
UNIT1- OBJECT ORIENTED PROGRAMMING IN JAVA- AIML IT-SPPU
Object Oriented Programming using c++ main four piller in this
Object Oriented Programming.pptx its a opps concept in c++ which is helpful
Principles of OOPs.pptx
Object oriented programming
Unit 1- Basic concept of object-oriented-programming.ppt
Introduction to Object Oriented Programming.pptx
oop.pptx
Object Oriented Programming fundamentals.pptx
Object Oriented Programming Language is an oop
Characteristics-and-Advantages-of-Object-Oriented-Programming.pptx
Principles and advantages of oop ppt
Block_1_Unit- I.pdf bca learning for exam you
Lesson 1 - Object Oriented Programming CPP103.pptx
CPP-Unit 1.pptx
L1-Introduction to OOPs concepts.pdf
Object Oriented Programming.pptx shiva
Chapter 04 object oriented programming
Rajib Ali Presentation on object oreitation oop.pptx
Ad

Recently uploaded (20)

PDF
RMMM.pdf make it easy to upload and study
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
Classroom Observation Tools for Teachers
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PPTX
Lesson notes of climatology university.
PDF
Complications of Minimal Access Surgery at WLH
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
Computing-Curriculum for Schools in Ghana
PPTX
Cell Structure & Organelles in detailed.
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PPTX
Presentation on HIE in infants and its manifestations
RMMM.pdf make it easy to upload and study
Anesthesia in Laparoscopic Surgery in India
Abdominal Access Techniques with Prof. Dr. R K Mishra
Classroom Observation Tools for Teachers
Microbial diseases, their pathogenesis and prophylaxis
O7-L3 Supply Chain Operations - ICLT Program
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
202450812 BayCHI UCSC-SV 20250812 v17.pptx
Lesson notes of climatology university.
Complications of Minimal Access Surgery at WLH
Microbial disease of the cardiovascular and lymphatic systems
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Final Presentation General Medicine 03-08-2024.pptx
Computing-Curriculum for Schools in Ghana
Cell Structure & Organelles in detailed.
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Presentation on HIE in infants and its manifestations

object oriented programming(oops)

  • 2. CONTENTS Merits and Demerits of object oriented programming 04 Characteristics of object oriented language: classes and objects. encapsulation-data abstraction- inheritance - polymorphism Why object oriented programming? 01 03 02
  • 3. Why object oriented programming? As the name suggests, Object-Oriented Programming or OOPs refers to languages that uses objects in programming. Object- oriented programming aims to implement real-world entities like inheritance, hiding, polymorphism etc. in programming. We can not apply OOP everywhere. It is applied only when it is required. It is not suitable for all types of problems. The main aim of OOP is to bind together the data and the functions that operate on them so that no other part of the code can access this data except that function. Object Oriented programming (OOP) is a programming paradigm that relies on the concept of classes and objects. It is used to structure a software program into simple, reusable pieces of code blueprints (usually called classes), which are used to create individual instances of objects.
  • 4. CLASSES A class in C++ is the building block that leads to Object- Oriented programming. It is a user-defined data type, which holds its own data members and member functions, which can be accessed and used by creating an instance of that class. A C++ class is like a blueprint for an object. OBJECTS An Object is an instance of a Class. When a class is defined, no memory is allocated but when it is instantiated (i.e. an object is created) memory is allocated. Object can be created many times as per requirement // CLASS class CAR{ public: string color; string model; }; int main(){ // OBJECTS CAR FORD; FORD.color = "Green"; FORD.color = "Mustang"; CAR TOYTA; TOYTA.color = "Red"; TOYTA.model = "Prius"; CAR VOLKSWAGEN; VOLKSWAGEN.color = "Blue"; VOLKSWAGEN.model = "Golf"; PROGRAM
  • 5. ENCAPSULATION In object-oriented computer programming (OOP) languages, the notion of encapsulation (or OOP Encapsulation) refers to the bundling of data, along with the methods that operate on that data, into a single unit. A class is a program-code-template that allows developers to create an object that has both variables (data) and behaviors (functions or methods). A class is an example of encapsulation in computer science in that it consists of data and methods that have been bundled into a single unit. DATA ABSTRACTION Abstraction means that the user interacts with only selected attributes and methods of an object. Abstraction uses simplified, high level tools, to access a complex object. Abstraction is using simple classes to represent complexity. Abstraction is an extension of encapsulation. For example, you don’t have to know all the details of how the engine works to drive a car. A driver only uses a small selection of tools: like gas pedal, brake, steering wheel, blinker. The engineering is hidden from the driver.
  • 6. Inheritance Inheritance is the procedure in which one class inherits the attributes and methods of another class. The class whose properties and methods are inherited is known as the Parent class. And the class that inherits the properties from the parent class is the Child class. For example, a child inherits the traits of his/her parents. With inheritance, we can reuse the fields and methods of the existing class. Hence, inheritance facilitates Reusability and is an important concept of OOPs. Polymorphism A person at the same time can have different characteristics. Like a man at the same time is a father, a husband, an employee. So the same person possesses different behavior in different situations. This is called polymorphism. Polymorphism is considered one of the important features of Object-Oriented Programming. Polymorphism allows us to perform a single action in different ways. In other words, polymorphism allows you to define one interface and have multiple implementations.
  • 7. Merits and Demerits of OOP MERITS •OOP language allows to break the program into the bit-sized problems that can be solved easily (one object at a time). •OOP systems can be easily upgraded from small to large systems. •It is possible that multiple instances of objects co-exist without any interference, •It is possible to map the objects in problem domain to those in the program. •The principle of data hiding helps the programmer to build secure programs which cannot be invaded by the code in other parts of the program. •By using inheritance, we can eliminate redundant code and extend the use of existing classes. •The data-centered design approach enables us to capture more details of model in an implementable form. DEMERITS •The length of the programs developed using OOP language is much larger than the procedural approach. Since the program becomes larger in size, it requires more time to be executed that leads to slower execution of the program. •We can not apply OOP everywhere as it is not a universal language. It is applied only when it is required. It is not suitable for all types of problems. •OOPs take time to get used to it. The thought process involved in object-oriented programming may not be natural for some people. •Everything is treated as object in OOP so before applying it we need to have excellent thinking in terms of objects.
  • 8. CONCLUSION Object Oriented programming requires thinking about the structure of the program and planning at the beginning of coding. Looking at how to break up the requirements into simple, reusable classes that can be used to blueprint instances of objects. Overall, implementing OOP allows for better data structures and reusability, saving time in the long run.