Object Oriented Approach | C++ Programming

                The fundamental idea behind object-oriented language is to combine both data & function that separate data into a single unit such a unit is called object. A objects function called member function provides the way to access objects data.

The data item in an object can be access only by calling member function in object & data item cannot be accessed directly.


The data is hidden and safe from accidental alteration. In order to modify the data, we should know exactly what function interact with it, no other function can access the data.
               
Hence OOP focuses on data rather than algorithm for solving problems.

In other words, OOP is the method of implementation which program are organized as cp-operative collection of object.

A program in OOP consists several objects which communicate with each other by calling an object member function calling an object.
Object Oriented Approach


Figure: - Program Organization in OOP



In addition, OOP supports encapsulation, inheritance & polymorphism.
Ex: - simula, small talk, C++, Java, python, C#.


 IN OOP



  • ·         Emphasis is given on data rather than procedure.
  • ·         Problem are divided into objects
  • ·         Data structures are designed such that they characterize the objects.
  • ·         Functions and data are ties together in the data structures so that data       obstruction is introduced in addition to procedural abstraction.
  • ·         Data is hidden and cannot be accessed by external functions/
  • ·         Object communicate with each other through function
  • ·         New data and functions can be easily added.
  • ·         Follow the bottom-up approach of programming.

Elements/ Features of OOP: -



  • ·         Class
  • ·         Object
  • ·         Encapsulation
  • ·         Abstraction
  • ·         Inheritance
  • ·         Polymorphism
  • ·         Message Passing

Share To:

Arogya Thapa Magar

Post A Comment:

0 comments so far,add yours