Click here to hide categories Click here to show left categories

User: Home          welcome : Guest          Log In / Register here     




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;

Share this article   |    Print    |    Article read by 3054 times
Author:
Rohit kakria
I am software developer, moderator of xpode.com
Related Articles: No related article
Related Interview Questions: No related interview question