Tuesday, February 24, 2015

Summary of Object-Oriented Programming concepts

       Object-Oriented Programming(OOP) is a programming methodology based on objects, instead of just functions and procedures. 

For better understanding, I will start off with my understanding of an object and class.
Everything in reality can be an object.
For instance, let’s assume ‘cat’ is an object. 
Then this cat has its characteristics or properties (color, name, weight). 
And also, this cat can generate or do some  actions(mewing, eating, sleeping, hiding).

       In OOP, color,name,weight are called ‘property’ and actions are ‘method’.
Let me have a deeply applied example, “Black cat is sleeping.”
From above sentence, ‘cat' is one of the object.  
And the adjective that describes its color ‘black’ is a property.    
The behavior ‘sleeping’ is a method.
Just like a cat, dog, wolf and tiger can be an object!                         
They have very similar property and methods, in this case, I can group them by some standards into a “class".

        In OOP, objects can  exchange information in a standardized manner, and can be combined with one another as modules or blocks. Each object is independent which means that it can be changed without affecting other objects or module.
Objects can run (execute) by itself, and can be interlocked with other objects.

No comments:

Post a Comment