Thursday, August 25, 2011

Advantages of Object Oriented Programming

Advantages of Object Oriented Programming

As discussed in my previous post, Object Oriented Programming enables you to reuse various components of a program across programs. Reusability of codes not only saves time but also the effort of the programming team.

Some of the advantages of Object Oriented Programming include:

  • Real world programming
  • Reusability of codes
  • Modularity of codes
  • Information hiding
Let’s try and discuss each of these advantages in details.

Object Oriented Programming (OOP) and Procedural Programming Approach

Object Oriented Programming (OOP)

Since Java is an Object Programming Language, I have decided to write on the concept of Object Oriented Programming before moving to details about Java. So in this post and a few subsequent posts, I shall be writing about the concept of Object Oriented Programming.

Before Object Oriented Programming came into effect, procedural programming was in use. Programs written using procedural programming approach consist of various functions. These functions can be executed anywhere within the program. The functions of procedural programs are interdependent; therefore they are difficult to separate from one another. These interdependent functions can not be reused in other programs. As a result, even for a similar task across programs, the entire function has to be recoded. This made program development a complex task.