SlideShare a Scribd company logo
1 of 20
Introduction to Object Oriented
         Programming
Evolution of Programming Paradigms
• Structured Programming
  – Large programming project
  – Emphasis on algorithm rather than data
  – Programs are divided into individual procedures
    that perform discrete tasks
  – Procedures are independent of each other as far
    as possible
  – Procedures have their own local data and
    processing logic
Evolution of Programming Paradigms
 – Parameter passing facility between the
   procedures for information communication
 – Introduced the concept of user defined data types
 – Support modular programming
 – Projects can be broken up into modules and
   programmed independently
 – Scope of the data items is controlled across
   modules
 – Maintenance of a large software system is tedious
   and costly
Object oriented programming
                 language
• Object oriented programming is a method of
  implementation in which programs are organized as co-
  operative collection of objects, each of which represents an
  instance of some class and whose classes are all members
  of hierarchy of classes united through the property called
  inheritance.
• Object Based Programming Languages
   – Encapsulation
   – Object Identity
• Example
   – Ada
• Object Oriented Programming Languages
   – Object Based features
Object oriented programming
               language
  – Inheritance
  – Polymorphism
• Example
  – C++, Java, Smalltalk, Eiffel
• Developed by Bjarne Stroustrup at AT&T Bell
  Laboratories in USA
• Incremented version of C
• Superset of C
Evolution of Programming Paradigms
• Object Oriented Programming
  – OOP treats data as a critical element
  – Emphasis on data rather than algorithm
  – Decompose the problem into number of entities
    namely objects
  – Doesn’t allow data to flow freely around the
    system
  – Data is hidden and cannot be accessed by external
    function
Evolution of Programming Paradigms
 – Data and the functions that operate on the data
   are tied together in the data structure
 – Object may communicate with each other through
   functions
 – New data and functions can be added whenever
   necessary
 – Follows bottom up approach
Basic Concepts of Object Oriented
              Programming
•   Object
•   Classes
•   Data abstraction
•   Encapsulation
•   Inheritance
•   Polymorphism
•   Dynamic Binding
•   Message Passing
Basic Concepts of Object Oriented
            Programming
• Object
  – Objects are the basic run time entities in an object
    oriented system
  – Object is a instance of class
  – We can say that objects are variables of the type
    class
  – Objects can be student, employee, car, book, etc
Basic Concepts of Object Oriented
          Programming
Object representation
Basic Concepts of Object Oriented
             Programming
• Classes
  – A class is a user defined data type.
  – A class is a collection of data member and member
    functions.
  – Variable declared in class are called data member and
    functions declared in class are known as member
    functions.
  – A class is an abstraction of the real world entities with
    similar properties.
  – A class identifies a set of similar properties.
  – A class is an implementation of abstract data type.
Basic Concepts of Object Oriented
            Programming
• Data Abstraction

  – Abstraction refers to the act of representing
    essential features without including the
    background details or explanations.

  – Classes use the concept of abstraction and are
    defined as a list of abstract attributes such as
    size, weight, cost etc.
Basic Concepts of Object Oriented
            Programming
• Encapsulation

  – The wrapping of data and functions into a single
    unit is known as encapsulation.


  – The data is not accessible to the outside
    world, and only those functions which are
    wrapped in the class can access it.
Basic Concepts of Object Oriented
            Programming
• Inheritance
  – Inheritance is the process by which objects of one
    class acquire the properties of objects of another
    class.
  – Create a new class from existing class.
  – The main benefits of the Inheritance is code
    reusability.
     • Add additional features to an existing class without
       modifying it.
Basic Concepts of Object Oriented
            Programming
• Polymorphism
  – Polymorphism is a Greek term.
  – It means the ability to take more than one form.
  – An operation may exhibit different behaviors in
    different instances.
  – The behavior depends upon the type of data used
    in the operation.
     • For adding two number operation will generate sum of
       two number.
     • For adding two string operation will concate two string.
Basic Concepts of Object Oriented
            Programming
• Dynamic Binding(Late Binding)

  – Binding refers to the linking of a procedure call to
    the code to be executed in response to call.

  • Dynamic binding means that the code associated with a
    given function call is not known until the time of the call at
    run time.
Basic Concepts of Object Oriented
            Programming
• Message Passing
  – Objects communicate with one another by
    sending and receiving information.
              Student.setData(Id, Name);



     Object
                        Message      Information
Advantages of OOP
• Through inheritance, redundant code is
  eliminated and extend the use of existing classes.
• One can build programs from the standard
  working modules that communicate with one
  another.
  – No need to write from scratch.
  – Save the development time and increase the
    productivity.
• The principal of data hiding helps the
  programmer to build the secure program.
Advantages of OOP
• The data centered design approach enable
  programmer to get details of a model in
  implementable form.
• Possible to map objects in the problem domain to
  those in the program.
• It is easy to partition the work in project based on
  objects.
• Easily upgradable from small system to large
  system.
• Software complexity can be easily managed.
Application of OOP
What are the applications of OOP?
What are the application of C++?

More Related Content

What's hot

Oop c++class(final).ppt
Oop c++class(final).pptOop c++class(final).ppt
Oop c++class(final).ppt
Alok Kumar
 
Introduction to oop
Introduction to oop Introduction to oop
Introduction to oop
Kumar
 
Object Oriented Analysis and Design
Object Oriented Analysis and DesignObject Oriented Analysis and Design
Object Oriented Analysis and Design
Haitham El-Ghareeb
 
Object and class relationships
Object and class relationshipsObject and class relationships
Object and class relationships
Pooja mittal
 

What's hot (20)

Fundamentals of OOP (Object Oriented Programming)
Fundamentals of OOP (Object Oriented Programming)Fundamentals of OOP (Object Oriented Programming)
Fundamentals of OOP (Object Oriented Programming)
 
Arrays in Java
Arrays in JavaArrays in Java
Arrays in Java
 
Basic Concepts of OOPs (Object Oriented Programming in Java)
Basic Concepts of OOPs (Object Oriented Programming in Java)Basic Concepts of OOPs (Object Oriented Programming in Java)
Basic Concepts of OOPs (Object Oriented Programming in Java)
 
Object-oriented concepts
Object-oriented conceptsObject-oriented concepts
Object-oriented concepts
 
Lecture 1 oop
Lecture 1 oopLecture 1 oop
Lecture 1 oop
 
Object Oriented Programming Principles
Object Oriented Programming PrinciplesObject Oriented Programming Principles
Object Oriented Programming Principles
 
Object oriented programming c++
Object oriented programming c++Object oriented programming c++
Object oriented programming c++
 
Oop c++class(final).ppt
Oop c++class(final).pptOop c++class(final).ppt
Oop c++class(final).ppt
 
Object Oriented Programming Using C++
Object Oriented Programming Using C++Object Oriented Programming Using C++
Object Oriented Programming Using C++
 
Class and Objects in Java
Class and Objects in JavaClass and Objects in Java
Class and Objects in Java
 
Unit 1 introduction to data structure
Unit 1   introduction to data structureUnit 1   introduction to data structure
Unit 1 introduction to data structure
 
Object Oriented Programming Languages
Object Oriented Programming LanguagesObject Oriented Programming Languages
Object Oriented Programming Languages
 
Object Oriented Programming Concepts for beginners
Object Oriented Programming Concepts for beginners Object Oriented Programming Concepts for beginners
Object Oriented Programming Concepts for beginners
 
Object oriented programming concepts
Object oriented programming conceptsObject oriented programming concepts
Object oriented programming concepts
 
Introduction to oop
Introduction to oopIntroduction to oop
Introduction to oop
 
Introduction to oop
Introduction to oop Introduction to oop
Introduction to oop
 
Need of object oriented programming
Need of object oriented programmingNeed of object oriented programming
Need of object oriented programming
 
Ooad unit – 1 introduction
Ooad unit – 1 introductionOoad unit – 1 introduction
Ooad unit – 1 introduction
 
Object Oriented Analysis and Design
Object Oriented Analysis and DesignObject Oriented Analysis and Design
Object Oriented Analysis and Design
 
Object and class relationships
Object and class relationshipsObject and class relationships
Object and class relationships
 

Viewers also liked

Lecture01 object oriented-programming
Lecture01 object oriented-programmingLecture01 object oriented-programming
Lecture01 object oriented-programming
Hariz Mustafa
 
5 structured programming
5 structured programming 5 structured programming
5 structured programming
hccit
 
Introduction to Pseudocode
Introduction to PseudocodeIntroduction to Pseudocode
Introduction to Pseudocode
Damian T. Gordon
 
Software requirements specification
Software  requirements specificationSoftware  requirements specification
Software requirements specification
Krishnasai Gudavalli
 

Viewers also liked (20)

Lecture01 object oriented-programming
Lecture01 object oriented-programmingLecture01 object oriented-programming
Lecture01 object oriented-programming
 
Oops ppt
Oops pptOops ppt
Oops ppt
 
Project Report - Diabetic Profile Management System : Structured Programming ...
Project Report - Diabetic Profile Management System : Structured Programming ...Project Report - Diabetic Profile Management System : Structured Programming ...
Project Report - Diabetic Profile Management System : Structured Programming ...
 
Unit2 Software engineering UPTU
Unit2 Software engineering UPTUUnit2 Software engineering UPTU
Unit2 Software engineering UPTU
 
Uc14 chap13
Uc14 chap13Uc14 chap13
Uc14 chap13
 
Modular programming
Modular programmingModular programming
Modular programming
 
3 Function Overloading
3 Function Overloading3 Function Overloading
3 Function Overloading
 
Good Programming Practice
Good Programming PracticeGood Programming Practice
Good Programming Practice
 
Why C is Called Structured Programming Language
Why C is Called Structured Programming LanguageWhy C is Called Structured Programming Language
Why C is Called Structured Programming Language
 
5 structured programming
5 structured programming 5 structured programming
5 structured programming
 
hormonal replacement therapy
hormonal replacement therapyhormonal replacement therapy
hormonal replacement therapy
 
structured programming
structured programmingstructured programming
structured programming
 
Object-Oriented Programming Concepts
Object-Oriented Programming ConceptsObject-Oriented Programming Concepts
Object-Oriented Programming Concepts
 
Basic concepts of object oriented programming
Basic concepts of object oriented programmingBasic concepts of object oriented programming
Basic concepts of object oriented programming
 
Software Requirement Specification
Software Requirement SpecificationSoftware Requirement Specification
Software Requirement Specification
 
Ethical Dilemma on Transsexuality
Ethical Dilemma on TranssexualityEthical Dilemma on Transsexuality
Ethical Dilemma on Transsexuality
 
Writing algorithms
Writing algorithmsWriting algorithms
Writing algorithms
 
Introduction to Pseudocode
Introduction to PseudocodeIntroduction to Pseudocode
Introduction to Pseudocode
 
Software requirements specification
Software  requirements specificationSoftware  requirements specification
Software requirements specification
 
Feasibility Study
Feasibility StudyFeasibility Study
Feasibility Study
 

Similar to 1 unit (oops)

1unit-120324103142-phpapp02.pdf
1unit-120324103142-phpapp02.pdf1unit-120324103142-phpapp02.pdf
1unit-120324103142-phpapp02.pdf
SahajShrimal1
 
Lesson 1 - Object Oriented Programming CPP103.pptx
Lesson 1 - Object Oriented Programming CPP103.pptxLesson 1 - Object Oriented Programming CPP103.pptx
Lesson 1 - Object Oriented Programming CPP103.pptx
LuiFlor
 
8 oo approach&uml-23_feb
8 oo approach&uml-23_feb8 oo approach&uml-23_feb
8 oo approach&uml-23_feb
Raj Shah
 

Similar to 1 unit (oops) (20)

1unit-120324103142-phpapp02.pdf
1unit-120324103142-phpapp02.pdf1unit-120324103142-phpapp02.pdf
1unit-120324103142-phpapp02.pdf
 
Principles of OOPs.pptx
Principles of OOPs.pptxPrinciples of OOPs.pptx
Principles of OOPs.pptx
 
OOP-1.pptx
OOP-1.pptxOOP-1.pptx
OOP-1.pptx
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 
itft-Fundamentals of object–oriented programming in java
itft-Fundamentals of object–oriented programming in javaitft-Fundamentals of object–oriented programming in java
itft-Fundamentals of object–oriented programming in java
 
CPP-Unit 1.pptx
CPP-Unit 1.pptxCPP-Unit 1.pptx
CPP-Unit 1.pptx
 
1. OBJECT ORIENTED PROGRAMMING USING JAVA - OOps Concepts.ppt
1. OBJECT ORIENTED PROGRAMMING USING JAVA - OOps Concepts.ppt1. OBJECT ORIENTED PROGRAMMING USING JAVA - OOps Concepts.ppt
1. OBJECT ORIENTED PROGRAMMING USING JAVA - OOps Concepts.ppt
 
Basic concepts of oops
Basic concepts of oopsBasic concepts of oops
Basic concepts of oops
 
C++ in object oriented programming
C++ in object oriented programmingC++ in object oriented programming
C++ in object oriented programming
 
SKILLWISE - OOPS CONCEPT
SKILLWISE - OOPS CONCEPTSKILLWISE - OOPS CONCEPT
SKILLWISE - OOPS CONCEPT
 
Unit v(dsc++)
Unit v(dsc++)Unit v(dsc++)
Unit v(dsc++)
 
Object Oriented Programming in Systems Analysis
Object Oriented Programming in Systems AnalysisObject Oriented Programming in Systems Analysis
Object Oriented Programming in Systems Analysis
 
C++ chapter 1
C++ chapter 1C++ chapter 1
C++ chapter 1
 
Lesson 1 - Object Oriented Programming CPP103.pptx
Lesson 1 - Object Oriented Programming CPP103.pptxLesson 1 - Object Oriented Programming CPP103.pptx
Lesson 1 - Object Oriented Programming CPP103.pptx
 
DOC-20210303-WA0017..pptx,coding stuff in c
DOC-20210303-WA0017..pptx,coding stuff in cDOC-20210303-WA0017..pptx,coding stuff in c
DOC-20210303-WA0017..pptx,coding stuff in c
 
Lecture 1.pptx
Lecture 1.pptxLecture 1.pptx
Lecture 1.pptx
 
Introduction to Software - Coder Forge - John Mulhall
Introduction to Software - Coder Forge - John MulhallIntroduction to Software - Coder Forge - John Mulhall
Introduction to Software - Coder Forge - John Mulhall
 
OOPS_Unit_1
OOPS_Unit_1OOPS_Unit_1
OOPS_Unit_1
 
Object oriented programming 6 oop with c++
Object oriented programming 6  oop with c++Object oriented programming 6  oop with c++
Object oriented programming 6 oop with c++
 
8 oo approach&uml-23_feb
8 oo approach&uml-23_feb8 oo approach&uml-23_feb
8 oo approach&uml-23_feb
 

More from Jay Patel

Unit 3(rdbms)
Unit 3(rdbms)Unit 3(rdbms)
Unit 3(rdbms)
Jay Patel
 
Unit 3(rdbms)
Unit 3(rdbms)Unit 3(rdbms)
Unit 3(rdbms)
Jay Patel
 
Assignment 2(web)
Assignment 2(web)Assignment 2(web)
Assignment 2(web)
Jay Patel
 
Assignment 2(web)
Assignment 2(web)Assignment 2(web)
Assignment 2(web)
Jay Patel
 
Assignment 1(web)
Assignment 1(web)Assignment 1(web)
Assignment 1(web)
Jay Patel
 
I assignmnt(oops)
I assignmnt(oops)I assignmnt(oops)
I assignmnt(oops)
Jay Patel
 
Inline function(oops)
Inline function(oops)Inline function(oops)
Inline function(oops)
Jay Patel
 
Anchored data type
Anchored data typeAnchored data type
Anchored data type
Jay Patel
 
Selection sort
Selection sortSelection sort
Selection sort
Jay Patel
 
Mutlimedia authoring tools
Mutlimedia authoring toolsMutlimedia authoring tools
Mutlimedia authoring tools
Jay Patel
 
Multimedia software tools
Multimedia software toolsMultimedia software tools
Multimedia software tools
Jay Patel
 
Lecture6 text
Lecture6   textLecture6   text
Lecture6 text
Jay Patel
 
Lecture6 text
Lecture6   textLecture6   text
Lecture6 text
Jay Patel
 
Hypertext and hypermedia
Hypertext and hypermediaHypertext and hypermedia
Hypertext and hypermedia
Jay Patel
 
Multimedia software tools
Multimedia software toolsMultimedia software tools
Multimedia software tools
Jay Patel
 

More from Jay Patel (20)

Unit 3(rdbms)
Unit 3(rdbms)Unit 3(rdbms)
Unit 3(rdbms)
 
Unit 3(rdbms)
Unit 3(rdbms)Unit 3(rdbms)
Unit 3(rdbms)
 
Assignment 2(web)
Assignment 2(web)Assignment 2(web)
Assignment 2(web)
 
Quiz(web)
Quiz(web)Quiz(web)
Quiz(web)
 
Assignment 2(web)
Assignment 2(web)Assignment 2(web)
Assignment 2(web)
 
Assignment 1(web)
Assignment 1(web)Assignment 1(web)
Assignment 1(web)
 
I assignmnt(oops)
I assignmnt(oops)I assignmnt(oops)
I assignmnt(oops)
 
Inline function(oops)
Inline function(oops)Inline function(oops)
Inline function(oops)
 
Unit1
Unit1Unit1
Unit1
 
Cursor
CursorCursor
Cursor
 
Anchored data type
Anchored data typeAnchored data type
Anchored data type
 
Selection sort
Selection sortSelection sort
Selection sort
 
Mutlimedia authoring tools
Mutlimedia authoring toolsMutlimedia authoring tools
Mutlimedia authoring tools
 
Multimedia software tools
Multimedia software toolsMultimedia software tools
Multimedia software tools
 
Lecture6 text
Lecture6   textLecture6   text
Lecture6 text
 
Sound
SoundSound
Sound
 
Lecture6 text
Lecture6   textLecture6   text
Lecture6 text
 
Images
ImagesImages
Images
 
Hypertext and hypermedia
Hypertext and hypermediaHypertext and hypermedia
Hypertext and hypermedia
 
Multimedia software tools
Multimedia software toolsMultimedia software tools
Multimedia software tools
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Recently uploaded (20)

Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 

1 unit (oops)

  • 1. Introduction to Object Oriented Programming
  • 2. Evolution of Programming Paradigms • Structured Programming – Large programming project – Emphasis on algorithm rather than data – Programs are divided into individual procedures that perform discrete tasks – Procedures are independent of each other as far as possible – Procedures have their own local data and processing logic
  • 3. Evolution of Programming Paradigms – Parameter passing facility between the procedures for information communication – Introduced the concept of user defined data types – Support modular programming – Projects can be broken up into modules and programmed independently – Scope of the data items is controlled across modules – Maintenance of a large software system is tedious and costly
  • 4. Object oriented programming language • Object oriented programming is a method of implementation in which programs are organized as co- operative collection of objects, each of which represents an instance of some class and whose classes are all members of hierarchy of classes united through the property called inheritance. • Object Based Programming Languages – Encapsulation – Object Identity • Example – Ada • Object Oriented Programming Languages – Object Based features
  • 5. Object oriented programming language – Inheritance – Polymorphism • Example – C++, Java, Smalltalk, Eiffel • Developed by Bjarne Stroustrup at AT&T Bell Laboratories in USA • Incremented version of C • Superset of C
  • 6. Evolution of Programming Paradigms • Object Oriented Programming – OOP treats data as a critical element – Emphasis on data rather than algorithm – Decompose the problem into number of entities namely objects – Doesn’t allow data to flow freely around the system – Data is hidden and cannot be accessed by external function
  • 7. Evolution of Programming Paradigms – Data and the functions that operate on the data are tied together in the data structure – Object may communicate with each other through functions – New data and functions can be added whenever necessary – Follows bottom up approach
  • 8. Basic Concepts of Object Oriented Programming • Object • Classes • Data abstraction • Encapsulation • Inheritance • Polymorphism • Dynamic Binding • Message Passing
  • 9. Basic Concepts of Object Oriented Programming • Object – Objects are the basic run time entities in an object oriented system – Object is a instance of class – We can say that objects are variables of the type class – Objects can be student, employee, car, book, etc
  • 10. Basic Concepts of Object Oriented Programming Object representation
  • 11. Basic Concepts of Object Oriented Programming • Classes – A class is a user defined data type. – A class is a collection of data member and member functions. – Variable declared in class are called data member and functions declared in class are known as member functions. – A class is an abstraction of the real world entities with similar properties. – A class identifies a set of similar properties. – A class is an implementation of abstract data type.
  • 12. Basic Concepts of Object Oriented Programming • Data Abstraction – Abstraction refers to the act of representing essential features without including the background details or explanations. – Classes use the concept of abstraction and are defined as a list of abstract attributes such as size, weight, cost etc.
  • 13. Basic Concepts of Object Oriented Programming • Encapsulation – The wrapping of data and functions into a single unit is known as encapsulation. – The data is not accessible to the outside world, and only those functions which are wrapped in the class can access it.
  • 14. Basic Concepts of Object Oriented Programming • Inheritance – Inheritance is the process by which objects of one class acquire the properties of objects of another class. – Create a new class from existing class. – The main benefits of the Inheritance is code reusability. • Add additional features to an existing class without modifying it.
  • 15. Basic Concepts of Object Oriented Programming • Polymorphism – Polymorphism is a Greek term. – It means the ability to take more than one form. – An operation may exhibit different behaviors in different instances. – The behavior depends upon the type of data used in the operation. • For adding two number operation will generate sum of two number. • For adding two string operation will concate two string.
  • 16. Basic Concepts of Object Oriented Programming • Dynamic Binding(Late Binding) – Binding refers to the linking of a procedure call to the code to be executed in response to call. • Dynamic binding means that the code associated with a given function call is not known until the time of the call at run time.
  • 17. Basic Concepts of Object Oriented Programming • Message Passing – Objects communicate with one another by sending and receiving information. Student.setData(Id, Name); Object Message Information
  • 18. Advantages of OOP • Through inheritance, redundant code is eliminated and extend the use of existing classes. • One can build programs from the standard working modules that communicate with one another. – No need to write from scratch. – Save the development time and increase the productivity. • The principal of data hiding helps the programmer to build the secure program.
  • 19. Advantages of OOP • The data centered design approach enable programmer to get details of a model in implementable form. • Possible to map objects in the problem domain to those in the program. • It is easy to partition the work in project based on objects. • Easily upgradable from small system to large system. • Software complexity can be easily managed.
  • 20. Application of OOP What are the applications of OOP? What are the application of C++?