SlideShare ist ein Scribd-Unternehmen logo
1 von 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++?

Weitere ähnliche Inhalte

Was ist angesagt?

Object and class relationships
Object and class relationshipsObject and class relationships
Object and class relationships
Pooja mittal
 

Was ist angesagt? (20)

Object oriented programming c++
Object oriented programming c++Object oriented programming c++
Object oriented programming c++
 
Introduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingIntroduction to Object Oriented Programming
Introduction to Object Oriented Programming
 
Object Oriented Programming Using C++
Object Oriented Programming Using C++Object Oriented Programming Using C++
Object Oriented Programming Using C++
 
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)
 
Introduction to oop
Introduction to oopIntroduction to oop
Introduction to oop
 
Type casting in java
Type casting in javaType casting in java
Type casting in java
 
Basic concepts of object oriented programming
Basic concepts of object oriented programmingBasic concepts of object oriented programming
Basic concepts of object oriented programming
 
Object and class relationships
Object and class relationshipsObject and class relationships
Object and class relationships
 
Concepts In Object Oriented Programming Languages
Concepts In Object Oriented Programming LanguagesConcepts In Object Oriented Programming Languages
Concepts In Object Oriented Programming Languages
 
Oops
OopsOops
Oops
 
Applets in java
Applets in javaApplets in java
Applets in java
 
Data types in java
Data types in javaData types in java
Data types in java
 
Arrays in Java
Arrays in JavaArrays in Java
Arrays in Java
 
Characteristics of oop
Characteristics of oopCharacteristics of oop
Characteristics of oop
 
object oriented Programming ppt
object oriented Programming pptobject oriented Programming ppt
object oriented Programming ppt
 
Er model ppt
Er model pptEr model ppt
Er model ppt
 
Object Oriented Design Concept
Object Oriented Design ConceptObject Oriented Design Concept
Object Oriented Design Concept
 
Command line arguments
Command line argumentsCommand line arguments
Command line arguments
 
Python: Modules and Packages
Python: Modules and PackagesPython: Modules and Packages
Python: Modules and Packages
 
object oriented methodologies
object oriented methodologiesobject oriented methodologies
object oriented methodologies
 

Andere mochten auch

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
 
Pseudocode flowcharts
Pseudocode flowchartsPseudocode flowcharts
Pseudocode flowcharts
nicky_walters
 

Andere mochten auch (20)

Lecture01 object oriented-programming
Lecture01 object oriented-programmingLecture01 object oriented-programming
Lecture01 object oriented-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 ...
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
 
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
 
Flowchart pseudocode-examples
Flowchart pseudocode-examplesFlowchart pseudocode-examples
Flowchart pseudocode-examples
 
Pseudocode flowcharts
Pseudocode flowchartsPseudocode flowcharts
Pseudocode flowcharts
 

Ähnlich wie 1 unit (oops)

1unit-120324103142-phpapp02.pdf
1unit-120324103142-phpapp02.pdf1unit-120324103142-phpapp02.pdf
1unit-120324103142-phpapp02.pdf
SahajShrimal1
 
Principles and advantages of oop ppt
Principles and advantages of oop pptPrinciples and advantages of oop ppt
Principles and advantages of oop ppt
daxesh chauhan
 
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
 

Ähnlich wie 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
 
Principles and advantages of oop ppt
Principles and advantages of oop pptPrinciples and advantages of oop ppt
Principles and advantages of oop ppt
 
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
 
Lecture 1 oop
Lecture 1 oopLecture 1 oop
Lecture 1 oop
 

Mehr von 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
 

Mehr von 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
 

Kürzlich hochgeladen

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Kürzlich hochgeladen (20)

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
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...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
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
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 

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++?