OOP Concepts
BY
Mr. S.B.Gopal
Assistant Professor
ECE Department
Kongu Engineering
College
The Object-Oriented Approach
• Object-oriented languages are to
combine into a single unit (object)
both data and the functions that
operate on that data.
• An object’s functions, called
member functions in C++, typically
provide the only way to access its
data
• Data and its functions are said to be
encapsulated into a single entity.
• A C++ program typically consists of
a number of objects, which
communicate with each other by
calling one another’s member
functions
•
Characteristics of Object-Oriented
Languages
• Class
• Objects
• Encapsulation
• Abstraction
• Polymorphism
• Inheritance
Real Time Example – Human Being
• Broadly classified -> Male and Female
• Body Parts -> 2 hands, 2 legs,2 eyes, 1
nose etc..
• Body Functions –> Walk , Eat, See, Talk,
Hear etc..
Characteristics of Object-Oriented
Languages
• 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.
• Class
• Basic building block of C++
• A user-defined data type, which holds its own data members and
member functions
• It can be accessed and used by creating an instance of that class
• A class is like a blueprint for an object.
• Example of class Human Being.
Object
• Mr. Anand etc..
• Ms. Diya etc..
• You, Your Friend and Me commonly we have
physical existence.
• So Male is a class Mr. Anand is an object
• Female is a class Ms. Diya is an object.
Characteristics of Object-Oriented
Languages
• Object
• An object is an identifiable
entity with some
characteristics and
behaviour.
• 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.
class person
{
char name[20];
int id;
public:
void getdetails(){}
};
int main()
{
person p1; // p1 is a object
}
Inheritance
• The capability of a class to derive
properties and characteristics from
another class is called Inheritance
• Sub Class: The class that inherits
properties from another class is
called Sub class or Derived Class.
• Super Class: The class whose
properties are inherited by sub
class is called Base Class or Super
class.
• Reusability: Inheritance supports
the concept of “reusability”,
• Ex: Human being – class, Male
and Female subclass of human
being
Characteristics of Object-Oriented
Languages
• Encapsulation
• Encapsulation is defined as
binding together the data
and the functions that
manipulate them.
• Encapsulation also leads to
data abstraction or hiding.
• A real-life example Hands
used to hold things, Legs
used to walk, eyes used to
see etc.
Characteristics of Object-Oriented
Languages
• Abstraction
• The technique of creating new data types that are well suited to
an application to be programmed is known as data abstraction.
• The class is a construct in C++ for creating user defined data
types called Abstract Data Type (ADT)
• It provides only essential information about the data to the
outside world, hiding the background details or
implementation.
• A real-life example is our skin, which hides all the organs
inside the body and only it exposing the required parts.
Characteristics of Object-Oriented
Languages
• Polymorphism
• Polymorphism can defined as the ability of a message to be
displayed in more than one form.
• Example:
• A person at the same time can have different characteristic.
• A man at the same time is a father, a husband, an employee.
• The same person posses different behaviour in different
situations
• C+ supports operator overloading and function overloading.
Characteristics of Object-Oriented
Languages
• Operator Overloading:
• The process of making an
operator to exhibit different
behaviours in different
instances is known as operator
overloading.
• Eg: legs used to walk and
run,
• Changing legs to see or hold.
• Function Overloading
• Function overloading is using
a single function name to
perform different types of
tasks.
• Overriding – legs to walk
backward
Characteristics of Object-Oriented
Languages
• Message Passing
• Objects communicate with one another by sending and
receiving information to each other.
• Message passing involves specifying the name of the object,
the name of the function and the information to be sent.

More Related Content

PPTX
OOP Basic Concepts
PPTX
Introduction to oop and java fundamentals
PDF
12. Objects I
PPSX
Class as the basis of all computation
PPTX
Object oriented programming
PPTX
Object oriented programming
PPTX
Introduction to oop with c++
PPTX
Introduction to Object Oriented Programming
OOP Basic Concepts
Introduction to oop and java fundamentals
12. Objects I
Class as the basis of all computation
Object oriented programming
Object oriented programming
Introduction to oop with c++
Introduction to Object Oriented Programming

What's hot (20)

PPTX
Learn About Object:
PPT
Oop Presentation
PDF
Object oriented programming With C#
PPTX
Fundamentals of OOP (Object Oriented Programming)
PPTX
Object Oriented Programming Principles
PDF
Lecture 1 - Objects and classes
PPT
Class 11 lecture notes
PDF
PDF
Introduction to object oriented programming
PPTX
[OOP - Lec 01] Introduction to OOP
PDF
Object Oriented Paradigm
PPT
OOP programming
PPT
OOPs concept and implementation
PPSX
Object Oriented Programming Overview for the PeopleSoft Developer
DOC
C# by Zaheer Abbas Aghani
PPTX
[OOP - Lec 04,05] Basic Building Blocks of OOP
PPT
Object-oriented concepts
PDF
Object Oriented Programming Lecture Notes
Learn About Object:
Oop Presentation
Object oriented programming With C#
Fundamentals of OOP (Object Oriented Programming)
Object Oriented Programming Principles
Lecture 1 - Objects and classes
Class 11 lecture notes
Introduction to object oriented programming
[OOP - Lec 01] Introduction to OOP
Object Oriented Paradigm
OOP programming
OOPs concept and implementation
Object Oriented Programming Overview for the PeopleSoft Developer
C# by Zaheer Abbas Aghani
[OOP - Lec 04,05] Basic Building Blocks of OOP
Object-oriented concepts
Object Oriented Programming Lecture Notes
Ad

Similar to Oops concepts (20)

PPTX
Object Oriented Programming Concepts for beginners
PPTX
oop.pptx
DOC
C# by Zaheer Abbas Aghani
PPTX
OOPS Concept.pptx
PPTX
Object-Oriented concepts.pptx
PPTX
Advanced Topics on Database - Unit-2 AU17
PPTX
Principles and advantages of oop ppt
PPTX
Intro to object oriented programming.pptx
PPTX
Object oriented programming
PPTX
OOP Presentation.pptx
PPTX
OOP Presentation.pptx
PDF
Unit 3-Classes ,Objects and Inheritance.pdf
PPTX
classes and objects concepts.pptx
PDF
It 405 materi 3 objek dan kelas
PDF
L1-Introduction to OOPs concepts.pdf
PPTX
Intro to oop.pptx
PPTX
UNIT - 1 Java Fundamentals, Basics of java
PPTX
Principles of OOPs.pptx
PPT
Object -oriented analysis and design.ppt
PPTX
Object oriented programming 6 oop with c++
Object Oriented Programming Concepts for beginners
oop.pptx
C# by Zaheer Abbas Aghani
OOPS Concept.pptx
Object-Oriented concepts.pptx
Advanced Topics on Database - Unit-2 AU17
Principles and advantages of oop ppt
Intro to object oriented programming.pptx
Object oriented programming
OOP Presentation.pptx
OOP Presentation.pptx
Unit 3-Classes ,Objects and Inheritance.pdf
classes and objects concepts.pptx
It 405 materi 3 objek dan kelas
L1-Introduction to OOPs concepts.pdf
Intro to oop.pptx
UNIT - 1 Java Fundamentals, Basics of java
Principles of OOPs.pptx
Object -oriented analysis and design.ppt
Object oriented programming 6 oop with c++
Ad

Recently uploaded (20)

PPTX
Share_Module_2_Power_conflict_and_negotiation.pptx
PDF
BP 505 T. PHARMACEUTICAL JURISPRUDENCE (UNIT 1).pdf
PPTX
Introduction to pro and eukaryotes and differences.pptx
PDF
Complications of Minimal Access-Surgery.pdf
PDF
International_Financial_Reporting_Standa.pdf
PDF
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
PDF
LIFE & LIVING TRILOGY- PART (1) WHO ARE WE.pdf
PDF
Journal of Dental Science - UDMY (2022).pdf
PDF
FOISHS ANNUAL IMPLEMENTATION PLAN 2025.pdf
PPTX
Module on health assessment of CHN. pptx
PDF
Skin Care and Cosmetic Ingredients Dictionary ( PDFDrive ).pdf
PDF
AI-driven educational solutions for real-life interventions in the Philippine...
PDF
LEARNERS WITH ADDITIONAL NEEDS ProfEd Topic
PDF
LIFE & LIVING TRILOGY - PART (3) REALITY & MYSTERY.pdf
PDF
Vision Prelims GS PYQ Analysis 2011-2022 www.upscpdf.com.pdf
PPTX
DRUGS USED FOR HORMONAL DISORDER, SUPPLIMENTATION, CONTRACEPTION, & MEDICAL T...
PDF
Myanmar Dental Journal, The Journal of the Myanmar Dental Association (2013).pdf
PDF
FORM 1 BIOLOGY MIND MAPS and their schemes
PDF
Race Reva University – Shaping Future Leaders in Artificial Intelligence
PDF
MBA _Common_ 2nd year Syllabus _2021-22_.pdf
Share_Module_2_Power_conflict_and_negotiation.pptx
BP 505 T. PHARMACEUTICAL JURISPRUDENCE (UNIT 1).pdf
Introduction to pro and eukaryotes and differences.pptx
Complications of Minimal Access-Surgery.pdf
International_Financial_Reporting_Standa.pdf
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
LIFE & LIVING TRILOGY- PART (1) WHO ARE WE.pdf
Journal of Dental Science - UDMY (2022).pdf
FOISHS ANNUAL IMPLEMENTATION PLAN 2025.pdf
Module on health assessment of CHN. pptx
Skin Care and Cosmetic Ingredients Dictionary ( PDFDrive ).pdf
AI-driven educational solutions for real-life interventions in the Philippine...
LEARNERS WITH ADDITIONAL NEEDS ProfEd Topic
LIFE & LIVING TRILOGY - PART (3) REALITY & MYSTERY.pdf
Vision Prelims GS PYQ Analysis 2011-2022 www.upscpdf.com.pdf
DRUGS USED FOR HORMONAL DISORDER, SUPPLIMENTATION, CONTRACEPTION, & MEDICAL T...
Myanmar Dental Journal, The Journal of the Myanmar Dental Association (2013).pdf
FORM 1 BIOLOGY MIND MAPS and their schemes
Race Reva University – Shaping Future Leaders in Artificial Intelligence
MBA _Common_ 2nd year Syllabus _2021-22_.pdf

Oops concepts

  • 1. OOP Concepts BY Mr. S.B.Gopal Assistant Professor ECE Department Kongu Engineering College
  • 2. The Object-Oriented Approach • Object-oriented languages are to combine into a single unit (object) both data and the functions that operate on that data. • An object’s functions, called member functions in C++, typically provide the only way to access its data • Data and its functions are said to be encapsulated into a single entity. • A C++ program typically consists of a number of objects, which communicate with each other by calling one another’s member functions •
  • 3. Characteristics of Object-Oriented Languages • Class • Objects • Encapsulation • Abstraction • Polymorphism • Inheritance
  • 4. Real Time Example – Human Being • Broadly classified -> Male and Female • Body Parts -> 2 hands, 2 legs,2 eyes, 1 nose etc.. • Body Functions –> Walk , Eat, See, Talk, Hear etc..
  • 5. Characteristics of Object-Oriented Languages • 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. • Class • Basic building block of C++ • A user-defined data type, which holds its own data members and member functions • It can be accessed and used by creating an instance of that class • A class is like a blueprint for an object. • Example of class Human Being.
  • 6. Object • Mr. Anand etc.. • Ms. Diya etc.. • You, Your Friend and Me commonly we have physical existence. • So Male is a class Mr. Anand is an object • Female is a class Ms. Diya is an object.
  • 7. Characteristics of Object-Oriented Languages • Object • An object is an identifiable entity with some characteristics and behaviour. • 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. class person { char name[20]; int id; public: void getdetails(){} }; int main() { person p1; // p1 is a object }
  • 8. Inheritance • The capability of a class to derive properties and characteristics from another class is called Inheritance • Sub Class: The class that inherits properties from another class is called Sub class or Derived Class. • Super Class: The class whose properties are inherited by sub class is called Base Class or Super class. • Reusability: Inheritance supports the concept of “reusability”, • Ex: Human being – class, Male and Female subclass of human being
  • 9. Characteristics of Object-Oriented Languages • Encapsulation • Encapsulation is defined as binding together the data and the functions that manipulate them. • Encapsulation also leads to data abstraction or hiding. • A real-life example Hands used to hold things, Legs used to walk, eyes used to see etc.
  • 10. Characteristics of Object-Oriented Languages • Abstraction • The technique of creating new data types that are well suited to an application to be programmed is known as data abstraction. • The class is a construct in C++ for creating user defined data types called Abstract Data Type (ADT) • It provides only essential information about the data to the outside world, hiding the background details or implementation. • A real-life example is our skin, which hides all the organs inside the body and only it exposing the required parts.
  • 11. Characteristics of Object-Oriented Languages • Polymorphism • Polymorphism can defined as the ability of a message to be displayed in more than one form. • Example: • A person at the same time can have different characteristic. • A man at the same time is a father, a husband, an employee. • The same person posses different behaviour in different situations • C+ supports operator overloading and function overloading.
  • 12. Characteristics of Object-Oriented Languages • Operator Overloading: • The process of making an operator to exhibit different behaviours in different instances is known as operator overloading. • Eg: legs used to walk and run, • Changing legs to see or hold. • Function Overloading • Function overloading is using a single function name to perform different types of tasks. • Overriding – legs to walk backward
  • 13. Characteristics of Object-Oriented Languages • Message Passing • Objects communicate with one another by sending and receiving information to each other. • Message passing involves specifying the name of the object, the name of the function and the information to be sent.