So what is this all about? What the heck is an Object Oriented language and what is OOPS? Surprisingly the seemingly complex concept is so trivial and it is the way we have been perceiving things for years. There is a huge similarity between human perception and Object Oriented Programming (OOP) and that makes the concept so popular.
Object Oriented Analysis is viewing the world in terms of classes and objects while Object Oriented Design is the way you link these objects and define your world.
Ok... Now tell me whatever you see in the picture below.
Telling out TV, Dart, Bear... Congratulations... U already know Object Oriented Analysis. Feel like telling me... R u nuts?! Well... I'm not. This seemingly trivial picture explains how we are inherently good in Object Oriented Analysis. Yes... We always view the world as a collection of objects. a TV, a bear and so on which would indeed translate to a TV OBJECT, a bear OBJECT, etc.
In short things that you can think of and associate to some activities are all objects. And this means a BIG thing. Not all objects are visible. For instance, God Himself can be considered an object (though He is not apparently visible) and His activities include creation, protection and destruction to say the least. I would be a sinner if I don't give you the most popular definition of an object at this point. An object is an instance of a class.
I could hear you saying... "Great... So what is a class now?". So what does this mean? Before actually constructing your dream house, you plan your house, you decide the number of rooms in it, the color, the floor and everything related to it. You come up with a wonderful CAD showing each and every detail of your house and boy you are so happy dreaming about it. But where is your house? A mere drawing can't be your house even though it clearly says how your house is supposed to be. The non-concrete abstract definition of your house that you have in your hand is the class. When you actually construct the house in flesh and blood (or rather stones, wood and concrete), that is where you instantiate or create an actual entity that is built as per the specifications in your class - the plan.
Hope this post provides a basic information on Classes, Objects and OOPS. We'll look into more details in future.
Feel like relaxing a bit? Checkout http://forwardszone.blogspot.com.
No comments:
Post a Comment