SlideShare une entreprise Scribd logo
1  sur  16
Object-Oriented
programming
Concepts
Name Muhammd Umair Sajjad
Roll No 531
Department BS(CS)(Evening)
Submitted to Mam Uswa Farooq
Submission date 16-06-2020
Govt. P/G Islamia College Faisalabad
13.1 OBJECT ORIENTED PROGRAMMING
:- Object-Oriented programming (OOP) is a programming
technique or method in which we design a program by using objects
and classes.
OBJECTS
LIVING THINGS
HUMAN ANIMALS
NON LIVING
THINGS
EACH ITEM
INCLUDE
CAR,DESK,TABLE
etc.
:- An object is an entity that
consists of data and functions
:- c++ and java are the example of
object oriented language
FEATURES
•Objects:-
Object oriented programming is based on object. An object is
an entity that is shown in fig.
• Classes:-
Classes are designs for creating objects. In classes we see what
is private and what is public.
• Real-world Modeling:-
It is based in real-world modeling. Entities have different
properties and capabilities in real world.
FEATURES
• Reuseability:-
We make function one time and use many time.
• Information Hiding:-
We show only those data that we want to show
the user.
• Polymorphism:-
Ability of object behave in multiple way.
13.2 OBJECTS
• Properties:-
Characteristics of an
object Example:-
Properties of a car is
• Color
• Price
• Model
• Engine Power
• Functions:-
It is the action
performed by an object
Example:-
Functions of a car is
• Start
• Stop
• Accelerate
• Reverse
13.3 ClASSES
:- A group of object with same properties.
:- Use as a model to create same type object.
:- Use to define the characteristics and function of object.
Declaring:-
Keyword class is used to declare classs which specifies variables
and functions that are common to all objects of class.
Access Specifiers:-
A command use to specify access level of the class member
•
Access Specifiers:-
Private
• It can only access within the class
Public
• It can access anywhere in the program
13.4 CREATING OBJECTS
:- A class is prototype for creatin object
:- Process of creating an object of class called instantiation
Executing Member Function:-
• The member function can be
executed after creating an
object.
Defining Member Function
outside Class:-
• The declaration of member
function specified within class.
• If define function outside we
use resolution operator (::).
13.5 CONSTRUCTORS
:- The member function has same name as class called
constructor.
Constructor cannot return any value
:- Use to initialize data member in the class.
Passing Parameters to Constructor:-
The parameters are written in parenthesis along with the
object name in declaration statement.
Constructor Overloading:-
When we declare multiple constructors with same name but
different parameters we called this constructor overloading.
13.6 DEFAULT COPY CONSTRUCTOR
:- A constructor which is available by default in all classes.
:- We give parameters in parenthesis or using assignment
operator.
13.7 DECONSTRUCTOR
:- A type of member function that is automatically executed
when an object of that class is destroyed is known as destructor.
:- Return no value
:- Cannot accept any parameter
:- Nmae is precede by sign (~)
13.8 OBJECT AS FUNCTION PARAMETERS
:- We can be passed object as parameter to member function
Returning Objects from Member Function:-
The method of returning an object from member function
is same as returning a simple variable
13.9 STATIC DATA MEMBER
:- A data member type that is shared among all objects of class
:- Define with static keyword
:- Characteristics of a static data member are same as normal
static variable
13.10 FRIENDS FUNCTION
:- A function that allow to access the private and protected
members of a
particular class from outside the class.
:- Normally private and protected member of any cannot be
accessed from
outside the class.
:- It enable the function to access the private and protected
members of Both

Contenu connexe

Tendances

C++ OOPS Concept
C++ OOPS ConceptC++ OOPS Concept
C++ OOPS ConceptBoopathi K
 
Oops concept in c++ unit 3 -topic 4
Oops concept in c++ unit 3 -topic 4Oops concept in c++ unit 3 -topic 4
Oops concept in c++ unit 3 -topic 4MOHIT TOMAR
 
principle of oop’s in cpp
principle of oop’s in cppprinciple of oop’s in cpp
principle of oop’s in cppgourav kottawar
 
Characteristics of OOPS
Characteristics of OOPS Characteristics of OOPS
Characteristics of OOPS abhishek kumar
 
Programming Fundamentals With OOPs Concepts (Java Examples Based)
Programming Fundamentals With OOPs Concepts (Java Examples Based)Programming Fundamentals With OOPs Concepts (Java Examples Based)
Programming Fundamentals With OOPs Concepts (Java Examples Based)indiangarg
 
Basics of Object Oriented Programming
Basics of Object Oriented ProgrammingBasics of Object Oriented Programming
Basics of Object Oriented ProgrammingAbhilash Nair
 
Object Oriented Programming Overview for the PeopleSoft Developer
Object Oriented Programming Overview for the PeopleSoft DeveloperObject Oriented Programming Overview for the PeopleSoft Developer
Object Oriented Programming Overview for the PeopleSoft DeveloperLee Greffin
 
Chapter 6 OOPS Concept
Chapter 6 OOPS ConceptChapter 6 OOPS Concept
Chapter 6 OOPS ConceptAmrit Kaur
 
Introduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingIntroduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingMd. Tanvir Hossain
 
Object Oriented Programming Principles
Object Oriented Programming PrinciplesObject Oriented Programming Principles
Object Oriented Programming PrinciplesAndrew Ferlitsch
 
C++ [ principles of object oriented programming ]
C++ [ principles of object oriented programming ]C++ [ principles of object oriented programming ]
C++ [ principles of object oriented programming ]Rome468
 
the Concept of Object-Oriented Programming
the Concept of Object-Oriented Programmingthe Concept of Object-Oriented Programming
the Concept of Object-Oriented ProgrammingAida Ramlan II
 

Tendances (20)

concept of oops
concept of oopsconcept of oops
concept of oops
 
C++ OOPS Concept
C++ OOPS ConceptC++ OOPS Concept
C++ OOPS Concept
 
Constructor in java
Constructor in javaConstructor in java
Constructor in java
 
Oops concept in c++ unit 3 -topic 4
Oops concept in c++ unit 3 -topic 4Oops concept in c++ unit 3 -topic 4
Oops concept in c++ unit 3 -topic 4
 
principle of oop’s in cpp
principle of oop’s in cppprinciple of oop’s in cpp
principle of oop’s in cpp
 
Characteristics of OOPS
Characteristics of OOPS Characteristics of OOPS
Characteristics of OOPS
 
Programming Fundamentals With OOPs Concepts (Java Examples Based)
Programming Fundamentals With OOPs Concepts (Java Examples Based)Programming Fundamentals With OOPs Concepts (Java Examples Based)
Programming Fundamentals With OOPs Concepts (Java Examples Based)
 
Basics of Object Oriented Programming
Basics of Object Oriented ProgrammingBasics of Object Oriented Programming
Basics of Object Oriented Programming
 
Object Oriented Programming Overview for the PeopleSoft Developer
Object Oriented Programming Overview for the PeopleSoft DeveloperObject Oriented Programming Overview for the PeopleSoft Developer
Object Oriented Programming Overview for the PeopleSoft Developer
 
OOPS Characteristics
OOPS CharacteristicsOOPS Characteristics
OOPS Characteristics
 
Chapter 6 OOPS Concept
Chapter 6 OOPS ConceptChapter 6 OOPS Concept
Chapter 6 OOPS Concept
 
Introduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingIntroduction to Object Oriented Programming
Introduction to Object Oriented Programming
 
Object Oriented Programming
Object Oriented ProgrammingObject Oriented Programming
Object Oriented Programming
 
C plusplus
C plusplusC plusplus
C plusplus
 
Object Oriented Programming Principles
Object Oriented Programming PrinciplesObject Oriented Programming Principles
Object Oriented Programming Principles
 
2 Object Oriented Programming
2 Object Oriented Programming2 Object Oriented Programming
2 Object Oriented Programming
 
C++ [ principles of object oriented programming ]
C++ [ principles of object oriented programming ]C++ [ principles of object oriented programming ]
C++ [ principles of object oriented programming ]
 
the Concept of Object-Oriented Programming
the Concept of Object-Oriented Programmingthe Concept of Object-Oriented Programming
the Concept of Object-Oriented Programming
 
Oops
OopsOops
Oops
 
Oops
OopsOops
Oops
 

Similaire à Object oriented programming

Object Oriented Programming Constructors & Destructors
Object Oriented Programming  Constructors &  DestructorsObject Oriented Programming  Constructors &  Destructors
Object Oriented Programming Constructors & Destructorsanitashinde33
 
C++ classes tutorials
C++ classes tutorialsC++ classes tutorials
C++ classes tutorialsakreyi
 
Constructor and Destructor
Constructor and DestructorConstructor and Destructor
Constructor and DestructorSunipa Bera
 
OOP Unit 2 - Classes and Object
OOP Unit 2 - Classes and ObjectOOP Unit 2 - Classes and Object
OOP Unit 2 - Classes and Objectdkpawar
 
Chapter 1- Introduction.ppt
Chapter 1- Introduction.pptChapter 1- Introduction.ppt
Chapter 1- Introduction.pptTigistTilahun1
 
C++ppt. Classs and object, class and object
C++ppt. Classs and object, class and objectC++ppt. Classs and object, class and object
C++ppt. Classs and object, class and objectsecondakay
 
Constructor & destructor
Constructor & destructorConstructor & destructor
Constructor & destructorSaharsh Anand
 
Object oriented programming 2
Object oriented programming 2Object oriented programming 2
Object oriented programming 2Aadil Ansari
 
CPP_,module2_1.pptx
CPP_,module2_1.pptxCPP_,module2_1.pptx
CPP_,module2_1.pptxAbhilashTom4
 
Introducing object oriented programming (oop)
Introducing object oriented programming (oop)Introducing object oriented programming (oop)
Introducing object oriented programming (oop)Hemlathadhevi Annadhurai
 
object oriented programming language.pptx
object oriented programming language.pptxobject oriented programming language.pptx
object oriented programming language.pptxsyedabbas594247
 
OBJECT ORIENTED PROGRAMING IN C++
OBJECT ORIENTED PROGRAMING IN C++ OBJECT ORIENTED PROGRAMING IN C++
OBJECT ORIENTED PROGRAMING IN C++ Dev Chauhan
 

Similaire à Object oriented programming (20)

Object Oriented Programming Constructors & Destructors
Object Oriented Programming  Constructors &  DestructorsObject Oriented Programming  Constructors &  Destructors
Object Oriented Programming Constructors & Destructors
 
oopm 2.pdf
oopm 2.pdfoopm 2.pdf
oopm 2.pdf
 
Php oop (1)
Php oop (1)Php oop (1)
Php oop (1)
 
C++ classes tutorials
C++ classes tutorialsC++ classes tutorials
C++ classes tutorials
 
Constructor and Destructor
Constructor and DestructorConstructor and Destructor
Constructor and Destructor
 
Constructor & Destructor
Constructor & DestructorConstructor & Destructor
Constructor & Destructor
 
Classes and objects
Classes and objectsClasses and objects
Classes and objects
 
OOP Unit 2 - Classes and Object
OOP Unit 2 - Classes and ObjectOOP Unit 2 - Classes and Object
OOP Unit 2 - Classes and Object
 
Chapter 1- Introduction.ppt
Chapter 1- Introduction.pptChapter 1- Introduction.ppt
Chapter 1- Introduction.ppt
 
C++ppt. Classs and object, class and object
C++ppt. Classs and object, class and objectC++ppt. Classs and object, class and object
C++ppt. Classs and object, class and object
 
Constructor & destructor
Constructor & destructorConstructor & destructor
Constructor & destructor
 
Oop ppt
Oop pptOop ppt
Oop ppt
 
Object oriented programming 2
Object oriented programming 2Object oriented programming 2
Object oriented programming 2
 
CPP_,module2_1.pptx
CPP_,module2_1.pptxCPP_,module2_1.pptx
CPP_,module2_1.pptx
 
Introducing object oriented programming (oop)
Introducing object oriented programming (oop)Introducing object oriented programming (oop)
Introducing object oriented programming (oop)
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 
Constructors and Destructors
Constructors and DestructorsConstructors and Destructors
Constructors and Destructors
 
Lecture 4. mte 407
Lecture 4. mte 407Lecture 4. mte 407
Lecture 4. mte 407
 
object oriented programming language.pptx
object oriented programming language.pptxobject oriented programming language.pptx
object oriented programming language.pptx
 
OBJECT ORIENTED PROGRAMING IN C++
OBJECT ORIENTED PROGRAMING IN C++ OBJECT ORIENTED PROGRAMING IN C++
OBJECT ORIENTED PROGRAMING IN C++
 

Dernier

UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jisc
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 

Dernier (20)

UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 

Object oriented programming

  • 2. Name Muhammd Umair Sajjad Roll No 531 Department BS(CS)(Evening) Submitted to Mam Uswa Farooq Submission date 16-06-2020 Govt. P/G Islamia College Faisalabad
  • 3. 13.1 OBJECT ORIENTED PROGRAMMING :- Object-Oriented programming (OOP) is a programming technique or method in which we design a program by using objects and classes. OBJECTS LIVING THINGS HUMAN ANIMALS NON LIVING THINGS EACH ITEM INCLUDE CAR,DESK,TABLE etc.
  • 4. :- An object is an entity that consists of data and functions :- c++ and java are the example of object oriented language
  • 5. FEATURES •Objects:- Object oriented programming is based on object. An object is an entity that is shown in fig. • Classes:- Classes are designs for creating objects. In classes we see what is private and what is public. • Real-world Modeling:- It is based in real-world modeling. Entities have different properties and capabilities in real world.
  • 6. FEATURES • Reuseability:- We make function one time and use many time. • Information Hiding:- We show only those data that we want to show the user. • Polymorphism:- Ability of object behave in multiple way.
  • 7. 13.2 OBJECTS • Properties:- Characteristics of an object Example:- Properties of a car is • Color • Price • Model • Engine Power • Functions:- It is the action performed by an object Example:- Functions of a car is • Start • Stop • Accelerate • Reverse
  • 8. 13.3 ClASSES :- A group of object with same properties. :- Use as a model to create same type object. :- Use to define the characteristics and function of object. Declaring:- Keyword class is used to declare classs which specifies variables and functions that are common to all objects of class. Access Specifiers:- A command use to specify access level of the class member •
  • 9. Access Specifiers:- Private • It can only access within the class Public • It can access anywhere in the program
  • 10. 13.4 CREATING OBJECTS :- A class is prototype for creatin object :- Process of creating an object of class called instantiation Executing Member Function:- • The member function can be executed after creating an object. Defining Member Function outside Class:- • The declaration of member function specified within class. • If define function outside we use resolution operator (::).
  • 11. 13.5 CONSTRUCTORS :- The member function has same name as class called constructor. Constructor cannot return any value :- Use to initialize data member in the class. Passing Parameters to Constructor:- The parameters are written in parenthesis along with the object name in declaration statement. Constructor Overloading:- When we declare multiple constructors with same name but different parameters we called this constructor overloading.
  • 12. 13.6 DEFAULT COPY CONSTRUCTOR :- A constructor which is available by default in all classes. :- We give parameters in parenthesis or using assignment operator.
  • 13. 13.7 DECONSTRUCTOR :- A type of member function that is automatically executed when an object of that class is destroyed is known as destructor. :- Return no value :- Cannot accept any parameter :- Nmae is precede by sign (~)
  • 14. 13.8 OBJECT AS FUNCTION PARAMETERS :- We can be passed object as parameter to member function Returning Objects from Member Function:- The method of returning an object from member function is same as returning a simple variable
  • 15. 13.9 STATIC DATA MEMBER :- A data member type that is shared among all objects of class :- Define with static keyword :- Characteristics of a static data member are same as normal static variable
  • 16. 13.10 FRIENDS FUNCTION :- A function that allow to access the private and protected members of a particular class from outside the class. :- Normally private and protected member of any cannot be accessed from outside the class. :- It enable the function to access the private and protected members of Both