Concept of Object-Oriented Program (OOP’s) - Leo Tuorials

Concept of Object-Oriented Program (OOP’s)

What is OOP ?

Object-Oriented Program treats data as a critical element in the program development and does not follow it to flow freely around the development and does not allow it to flow freely around the system. It ties data closely to the functions that operate on it, and protects it from accidental modification from outside functions.Object-Oriented Program allows decomposition of a problem into a number of entities called objects and then builds data and functions in Object-Oriented Program . The data of an object can be accessed only by the functions associated with that object.However functions of one object can access the function of other objects.

Some of the striking features of object-oriented programming are :

  1. Emphasis is on data rather than procedure
  2. Data structures are designed such that they characterize the objects
  3. Data is hidden and cannot be accessed by external functions.
  4. Programs are divided into what are known as objects.
  5. Functions that operate on the data of an object are tied together in the structure.
  6. Objects may communicate with each through functions.
  7. Follows bottom-up approach in program design.
  8. New data and functions can be easily added whenever necessary.
             Object-oriented programming is the most recent concept among programming paradigms and still means different things to different people.
            Thus, "Object-oriented programming as 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".

 In object oriented programming the problem is divided into objects. Thinking in terms of objects rather than functions makes the designing of program easier.

      Objects are the basic run-time entities in an object oriented system. Programming problem is analyzed in terms of objects system .Programming problem is analyzed in terms of objects and the nature of communication between them. Program objects should be chosen such that they match closely with the real world objects.

     Following are few candidates that can be treated as objects in different programming situation :

  1. Employees in a payroll processing system.\
  2. Data structures like linked lists,stacks,queues,etc..
  3. GUI elements like windows,menus,icons etc.
  4. Hardware device like disk drive,keyboard,printer etc.
  5. Various elements in computer games like cannons,guns,animals etc.
  6. Customers,sales person in a sales tracking system.
  7. Computers in a network model.

  Function in C++ -  LINK

Post a comment