Wednesday, December 17, 2008

OOPs --- A tool for code organisation

Today pankaj sir told us a good thing about OOPs.

How OOPs concepts comes into the reality.

While organizing the code our requirement was code should be modular.
From this we have the concept of function which does specific functionality.
If we write lot of functions then have we done the right organization? or something is missing?
Yes some thing is missing which is a Data.
we organized the functionality but our data is scattered,
then we realize that we should organize the data also.

So our code organization= data + function. = OBJECT

What is the good function?
Good function is the function which does only one thing and not the many.

what is good data?
which stores only data related to only 1 Object and not related to multiple objects .

So Now our Object become so strong that it has the data which is related to that object only and has functions which work on that data and 1 function does one thing only.


Once we build this structure we can start using OOP's tool to organize this object and there relationships (By using Inheritance,Interface , abstractions, Polymorphism ......)

About Me

PUNE, MAHARASHTRA, India
From India,Working as a senior software engineer