Tuesday, March 8, 2016

What are the features of Object Oriented Programming ?

Object oriented programming(OOP) is a programming paradigm, in which data is of prime concern and action associated with that data is a secondary aspect. 
Where as in procedure oriented programming paradigm, focus will be on actions, rather than data/objects. This image clearly demonstrates both the paradigms,


The OOP paradigm is based on cognitive theory, which deals with, the nature of  human brain in recognizing and understanding the problem, by associating the objects in the problem domain.
The primary advantages of using this paradigm for software development are easy design, easy maintenance and easy up gradation of software. These advantages are outcome of implementing features of object oriented programming, namely

  • Data Abstraction
  • Data Encapsulation
  • Classes and Objects
  • Inheritance
  • Run-time polymorphism
Let's explore these one by one and see how they contribute in the process of software development.
(one  feature --- in one post)

Data Abstraction: 
It is the concept, in which an object is described with essential characteristics, without going into the background details of it. The irrelevant details/characteristics of an object are chopped-off and focus will be only on essential aspects. 

Let's understand data abstraction with the help of this image...


From the image it is clear that, over abstraction leads to lesser details and thus we fall short of information to understand, where as  under abstraction leads to more details, some which are not relevant to the problem in hand and creates confusion.

Thus to make our solution simple to understand and easy to use, we need to implement just data abstraction, it should not be neither over abstraction(too much chopping-off) nor under abstraction.


This depends on user requirements. What the user is demanding and if you are providing exactly that, then it is Data Abstraction, If you provide lesser features than those given by user then it over abstraction. Here the user fall short of some features and rejects your product/software/design.

If you provide more features than those given by the user then it is under abstraction, with this also, user is not happy, as he has more features, which he do not intended to have, so he dislike it,

Let's understand it by going through a scenario. Let's say you are suppose to gift a mobile to your sister and grandfather.If you are smart, you will buy a simple mobile for grandfather using which he can do necessary tasks like calling , messaging etc, and you will  buy a smart phone for your sister , which she can use for browsing, online shopping etc. Here you understood the needs of users pin pointedly and provided the solutions accordingly. This is just abstraction.

Let's say, if you have gifted a smart phone to your grandpa, then what would have happened ? Obviously , he would have confused with so many features and may not use it conveniently. This is what under abstraction.

The other case is, if you have gifted a simple mobile to your sister, she would have taken it to trash, as it is of no use to her other than basic calling and messaging. This is case of over abstraction.
Thus from the above discussion, it can concluded that, by implementing data abstraction , we achieve simple design/user interface for the software.

This is just an anlogy to make you understand the concept of abstraction, may not exactly depict the process.

Do you find this post useful? your comments and suggestions would contribute in improving the content of this blog.
Let's share to grow and grow to share...


No comments:

Post a Comment