Would You Explain the Difference between a Class and an Object?

The question tests your fundamental understanding of object oriented design.  It is often asked for software engineer positions.

An object is a business entity with certain attributes and behaviors.    A class is the definition of an object.  It specifies that data elements and data formats that combine to reflect what an object presents.  A class also specifies the services that each object created form the class can be expected to perform.  The collection of all these services is the object’s interface, and represents what the object can do.

A class specifies the data and methods that operate on the data form each object that results form this specification.  The class definition also has some methods of its own that know how to create new objects.

Leave a comment

0 Comments.

Leave a Reply


[ Ctrl + Enter ]