Preface to Object Oriented Programming
The prime factor in the design of object oriented programming approach is to rectify some of the faults observed in the procedure oriented languages. OOP acts with data as a critical component in program development. It does not allow the data to flow freely around the systems. It ties data to the functions that operate on it and prevents it from accidental change due to external functions. OOP permits us to analyze a problem into a number of items called objects and then assembles data and functions around these items as per Figure. Following are the impressive characteristics of object-oriented programming:
- OOP pays more importance to data rather than function.
- Programs are divided into classes and their member functions.
- OOP follows a bottom-up approach.
- New data items and functions can be comfortably added whenever essential.
- Data is private and prevented from accessing external functions.
- Objects communicate with each other through functions.
Relation between data and member function in OOP