Object Vs Class
The first question I ask in any interview is what do you think is the difference between Object and Class. Most of the time I get the bookish answer that an object is an instance of class and class is a blueprint. Ofcourse the answer is right, but when I ask the candidate to forget about any programming language or technology and give me an example for a class and corresponding object from the real world, he/she most of the time tells me an example that always fits as example for class.
For example this is a common example that the candidates give. An example for a class would be Car and the corresponding object would be Maruti (an Indian car model). Think about this, how can Maruti be an instance of the Car class when Maruti by itself is a bluprint of a type of Car or in object oriented terms, Maruti inherits Car but is still a class. What really would be an object for the class car would be to really show a car that is running on the street or parked outside. Because that is real instance, that you can feel, get into and drive.
That’s Object Thinking foundation #1.












