An object is a code-based abstraction of a real-world entry or relationship. For instance, we might have a customer object that represents a real-world customer -such as customer number 123 – or we might have a File object that represents C:\config.sys on our computer’s hard drive.
A closely related term is class. A class is the code that defines our object, and all objects are created based on a class. A class is an abstraction of a real-world concept, and it provides the basic from which we create instances of specific objects. For example, in order to have a Customer object representing customer number 123, we must first have a Customer class that contains all of the code (methods, properties, events, variables, an so on)necessary to create Customer objects. Based on that class, we can create any number of objects – each one an instance of the class. Each object is identical to the others – except that it may contain different data.
We may create many instances of customer objects based on the same Customer class. All of the Customer objects are identical in terms of what they can do and the code they contain, but each one contains its own unique data. This means that each object represents a different physical customer.
