Object Oriented Programing (OOP)

“Object-oriented programming is an approach that provides a way of modularizing programs by creating partitioned memory area for both data and functions that can be used as templates for creating copies of such modules on demand”.

  • OOP defines classes to represent these things. 
  • Classes can contain data and methods (internal functions). 
  • Classes control access to internal data and methods. A public interface is used by external code when using the class. 
  • This is a highly effective way of modeling real-world problems inside a computer program.

FIGURE: The object-oriented paradigm.

Features of the Object Oriented programming 

  1. Emphasis is on doing rather than procedure. 
  2. programs are divided into what are known as objects. 
  3. Data structures are designed such that they characterize the objects. 
  4. Functions that operate on the data of an object are tied together in the data structure. 
  5. Data is hidden and can’t be accessed by external functions. 
  6. Objects may communicate with each other through functions. 
  7. New data and functions can be easily added. 
  8. Follows bottom-up approach in program design.
Advantages of OOP 
Object-oriented programming offers several major advantages to software development: 
  • Reduced susceptibility to errors: an object controls access to its own data. More specifically, an object can reject erroneous access attempts 
  • easy re-use: objects maintain themselves and can therefore be used as building blocks for other programs 
  • low maintenance requirement: an object type can modify its own internal data representation without requiring changes to the application.

Comments