Xpode.com        Click here to Print this article.

What is Object

An object is used to represent real world entities, such as person, place, thing, concept etc. that has either physical or conceptual existence that we find in normal day life. E.g. person, car, book, loan etc.

Every object has certain properties (or attributes or characteristics or features) on the basis of which we can distinguish one object from another. For example the person object has certain properties like name, age, date of birth, gender etc. Also every object performs certain operations. For example the person object can perform operations like move, listen, speak, sit etc.

The objects that are used in programming are also designed in the similar manner. They have certain properties called data and they perform various operations called functions.

Objects can communicate with each other through the technique of message passing.

In C++ an object can be created as under:

Syntax:
class_name object_name1, object_name2,……, object_namen;

Example:
student st1, st2;



http://


Contributed by:
Rohit kakria
I am software developer, moderator of xpode.com

Resourse address on xpode.com
http://www.xpode.com/Print.aspx?Articleid=62

Click here to go on website