SlideShare a Scribd company logo
Module 5
Overview of Object Oriented Prgg.
Features of OOP - Classes and Objects - “this” pointer - Constructors
and Destructors - Static Data Members, Static Member Functions
and Objects - Inline Functions – Call by reference - Functions with
default Arguments - Functions with Objects as Arguments - Friend
Functions and Friend Classes.
Object Oriented Prgg.
SOP OOP
Based on functions Based on classes and objects
Code Reusability is low Code Reusability is high
Does not support Supports inheritance, encapsulation,
polymorphism
C, Pascal, Fortran C++, Java, Python, C#
SOP is better for small programs where
simplicity and performance matter.
OOP is better for large-scale applications
due to modularity and reusability.
Object Oriented Prgg.
• Object-Oriented Programming (OOP) is a programming paradigm
based on the concept of objects, which encapsulate data
(attributes) and behavior (methods). It emphasizes modularity,
reusability, and abstraction to improve code organization and
maintainability.
• To support the principles of object-oriented programming, all OOP
languages have three traits in common: encapsulation,
polymorphism, and inheritance.
Object Oriented Prgg.
• Class
• Object
• Abstraction
• Encapsulation
• Inheritance
• Polymorphism
• Dynamic Binding
• Message Passing
Basic concepts of Object Oriented
Programming
• Class
• It is a way of binding data and functions together.
• The entire set of data and functions can be made a user-defined
data type with the help of a class.
• Once a class has been defined, we can create any number of
objects belonging to that class.
Object Oriented Prgg.
• Object
• Object is a basic run time entity.
• Is an Instance of class
• Represents a Place ,Person ,anything that have some attributes.
• Objects take up space in memory.
Object Oriented Programming
• Data Encapsulation
• The wrapping up of data and functions into a single unit is known
as encapsulation.
• Data 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.
Overview of Object Oriented
• Inheritance
• Deriving a new class from the existing one.
• process by which objects of one class acquire the properties of
objects of another class.
• supports the concept of hierarchical classification.
• provides the idea of reusability. This means that we can add
additional features to an existing class without modifying it. This is
possible by deriving a new class from the existing one. The new class
will have the combined features of both the classes.
Object Oriented Programming
• Data Abstraction
• Abstraction refers to the act of representing essential features
without including the background details or explanations.
Overview of Object Oriented
• Polymorphism
• a Greek term, means the ability to take more than one form.
• It is a feature that provides a function or an operator with more
than one definition.
• It can be implemented using function overloading, operator
overloading, function overriding, virtual function.
• Dynamic binding
• Binding refers to the linking of a procedure call to the code to be
executed in response to the call.
• Dynamic binding (also known as late binding) means that the code
associated with given procedure call is not known until the time of
the call at run-time. It is associated with polymorphism and
inheritance.
• Message Passing
• a set of objects can communicate with each other by sending and
receiving messages.
Object Oriented Prgg. Lang.
C++
• C++ was developed by Bjarne Stroustrup in 1979 at Bell Labs as an
extension of the C programming language.
• It was initially called "C with Classes" and later renamed to C++ in
1983.
• The language was designed to provide object-oriented features while
maintaining the efficiency and flexibility of C.
Object Oriented Prgg. Lang.
C++
• C++ was developed by Bjarne Stroustrup in 1979 at Bell Labs as an
extension of the C programming language.
• It was initially called "C with Classes" and later renamed to C++ in
1983.
• The language was designed to provide object-oriented features while
maintaining the efficiency and flexibility of C.
Object Oriented Programming WEOBRDSLKBNSDF
Advantages of OOPs
There are various advantages of object-oriented programming.
 OOPs provide reusability to the code and extend the use of existing classes.
 In OOPs, it is easy to maintain code as there are classes and objects, which
helps in making it easy to maintain rather than restructuring.
 It also helps in data hiding, keeping the data and information safe from
leaking or getting exposed.
 Object-oriented programming is easy to implement.

More Related Content

PDF
C++ chapter 1
PPTX
Principles of OOPs.pptx
PDF
OOPS_Unit_1
DOC
Introduction to OOPs Concept- Features, Basic concepts, Benefits and Applicat...
PDF
Oop basic overview
PPTX
C++ in object oriented programming
PPTX
1.1-Introduction to Object oriented.pptx
PPTX
Object oriented programming 6 oop with c++
C++ chapter 1
Principles of OOPs.pptx
OOPS_Unit_1
Introduction to OOPs Concept- Features, Basic concepts, Benefits and Applicat...
Oop basic overview
C++ in object oriented programming
1.1-Introduction to Object oriented.pptx
Object oriented programming 6 oop with c++

Similar to Object Oriented Programming WEOBRDSLKBNSDF (20)

PPTX
OOP CHAPTER object oreinted programming using c++
PPTX
Ch 1 Introduction to Object Oriented Programming.pptx
PPTX
principle of oop’s in cpp
PPTX
Object oriented programing
PPTX
Chapter 04 object oriented programming
PDF
UNIT1- OBJECT ORIENTED PROGRAMMING IN JAVA- AIML IT-SPPU
PPTX
CPP-Unit 1.pptx
PPTX
Principles and advantages of oop ppt
PPTX
IET307 OOP - object oriented programming concepts.pptx
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
DOC
Chapter1
PPT
Unit 1- Basic concept of object-oriented-programming.ppt
PPTX
Basic Concept of Object oriented Programming
PPTX
Unit - I Fundamentals of Object Oriented Programming .pptx
PPTX
Object Oriented Programming Language is an oop
PPTX
oop.pptx
PPT
Java Fundamentalojhgghjjjjhhgghhjjjjhhj.ppt
PDF
object oriented programming concepts and explanation
PDF
L1-Introduction to OOPs concepts.pdf
OOP CHAPTER object oreinted programming using c++
Ch 1 Introduction to Object Oriented Programming.pptx
principle of oop’s in cpp
Object oriented programing
Chapter 04 object oriented programming
UNIT1- OBJECT ORIENTED PROGRAMMING IN JAVA- AIML IT-SPPU
CPP-Unit 1.pptx
Principles and advantages of oop ppt
IET307 OOP - object oriented programming concepts.pptx
Object Oriented Programming using c++ main four piller in this
Object Oriented Programming.pptx its a opps concept in c++ which is helpful
Chapter1
Unit 1- Basic concept of object-oriented-programming.ppt
Basic Concept of Object oriented Programming
Unit - I Fundamentals of Object Oriented Programming .pptx
Object Oriented Programming Language is an oop
oop.pptx
Java Fundamentalojhgghjjjjhhgghhjjjjhhj.ppt
object oriented programming concepts and explanation
L1-Introduction to OOPs concepts.pdf
Ad

Recently uploaded (20)

PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PDF
Well-logging-methods_new................
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PPTX
OOP with Java - Java Introduction (Basics)
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
Current and future trends in Computer Vision.pptx
PPTX
additive manufacturing of ss316l using mig welding
DOCX
573137875-Attendance-Management-System-original
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PDF
Digital Logic Computer Design lecture notes
PPTX
bas. eng. economics group 4 presentation 1.pptx
PPTX
Geodesy 1.pptx...............................................
PPT
introduction to datamining and warehousing
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PPTX
UNIT 4 Total Quality Management .pptx
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PPTX
Sustainable Sites - Green Building Construction
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
R24 SURVEYING LAB MANUAL for civil enggi
Well-logging-methods_new................
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
OOP with Java - Java Introduction (Basics)
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Current and future trends in Computer Vision.pptx
additive manufacturing of ss316l using mig welding
573137875-Attendance-Management-System-original
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
Digital Logic Computer Design lecture notes
bas. eng. economics group 4 presentation 1.pptx
Geodesy 1.pptx...............................................
introduction to datamining and warehousing
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
UNIT 4 Total Quality Management .pptx
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
Sustainable Sites - Green Building Construction
Ad

Object Oriented Programming WEOBRDSLKBNSDF

  • 1. Module 5 Overview of Object Oriented Prgg. Features of OOP - Classes and Objects - “this” pointer - Constructors and Destructors - Static Data Members, Static Member Functions and Objects - Inline Functions – Call by reference - Functions with default Arguments - Functions with Objects as Arguments - Friend Functions and Friend Classes.
  • 2. Object Oriented Prgg. SOP OOP Based on functions Based on classes and objects Code Reusability is low Code Reusability is high Does not support Supports inheritance, encapsulation, polymorphism C, Pascal, Fortran C++, Java, Python, C# SOP is better for small programs where simplicity and performance matter. OOP is better for large-scale applications due to modularity and reusability.
  • 3. Object Oriented Prgg. • Object-Oriented Programming (OOP) is a programming paradigm based on the concept of objects, which encapsulate data (attributes) and behavior (methods). It emphasizes modularity, reusability, and abstraction to improve code organization and maintainability. • To support the principles of object-oriented programming, all OOP languages have three traits in common: encapsulation, polymorphism, and inheritance.
  • 4. Object Oriented Prgg. • Class • Object • Abstraction • Encapsulation • Inheritance • Polymorphism • Dynamic Binding • Message Passing
  • 5. Basic concepts of Object Oriented Programming • Class • It is a way of binding data and functions together. • The entire set of data and functions can be made a user-defined data type with the help of a class. • Once a class has been defined, we can create any number of objects belonging to that class.
  • 6. Object Oriented Prgg. • Object • Object is a basic run time entity. • Is an Instance of class • Represents a Place ,Person ,anything that have some attributes. • Objects take up space in memory.
  • 8. • Data Encapsulation • The wrapping up of data and functions into a single unit is known as encapsulation. • Data 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.
  • 9. Overview of Object Oriented • Inheritance • Deriving a new class from the existing one. • process by which objects of one class acquire the properties of objects of another class. • supports the concept of hierarchical classification. • provides the idea of reusability. This means that we can add additional features to an existing class without modifying it. This is possible by deriving a new class from the existing one. The new class will have the combined features of both the classes.
  • 11. • Data Abstraction • Abstraction refers to the act of representing essential features without including the background details or explanations.
  • 12. Overview of Object Oriented • Polymorphism • a Greek term, means the ability to take more than one form. • It is a feature that provides a function or an operator with more than one definition. • It can be implemented using function overloading, operator overloading, function overriding, virtual function.
  • 13. • Dynamic binding • Binding refers to the linking of a procedure call to the code to be executed in response to the call. • Dynamic binding (also known as late binding) means that the code associated with given procedure call is not known until the time of the call at run-time. It is associated with polymorphism and inheritance. • Message Passing • a set of objects can communicate with each other by sending and receiving messages.
  • 14. Object Oriented Prgg. Lang. C++ • C++ was developed by Bjarne Stroustrup in 1979 at Bell Labs as an extension of the C programming language. • It was initially called "C with Classes" and later renamed to C++ in 1983. • The language was designed to provide object-oriented features while maintaining the efficiency and flexibility of C.
  • 15. Object Oriented Prgg. Lang. C++ • C++ was developed by Bjarne Stroustrup in 1979 at Bell Labs as an extension of the C programming language. • It was initially called "C with Classes" and later renamed to C++ in 1983. • The language was designed to provide object-oriented features while maintaining the efficiency and flexibility of C.
  • 17. Advantages of OOPs There are various advantages of object-oriented programming.  OOPs provide reusability to the code and extend the use of existing classes.  In OOPs, it is easy to maintain code as there are classes and objects, which helps in making it easy to maintain rather than restructuring.  It also helps in data hiding, keeping the data and information safe from leaking or getting exposed.  Object-oriented programming is easy to implement.