Tuesday, June 17, 2008

Object Oriented Programming

Object Oriented Programming or shortly known as OOP is a programming concept, in which the structure of the program is designed as objects representing real life objects in the business case.

OK, here is what it really means.

When you create programs using OOP what you do is that you categorize the logic of the whole program into objects.

Think that you are building a program for registering students for courses. Then you can define objects such as Student, Registration Officer and Course. The important thing to remember when you define objects is that they should actively participate in the program.

In OOP programming, logic is handled by objects. When you take an object it consists of following categories.

  • Properties - Define how the object will look.
  • Methods - Define how the object will behave.

Take the above student registration system. If you take the Student object it has properties such as

  • Name
  • Age
  • Gender
  • Date of Birth

And it has methods such as

  • Select Course
  • Pay Money
  • Get Balance


OOP is easier to implement because it normally represent the real world inside the computer. After defining objects it is a matter of manipulating them in a logical manner to achieve the desired output.

How do you define objects?

Well how do you create a ceramic vase if you given the job?

You would first create a mould to create the vase. Won’t you?

The same applies to creating objects.

The mould for an object is called a Class.

No comments:

Post a Comment