| Object | Class |
|---|---|
| Object is an instance of a class. | A class can have many objects. |
| Data and function which combine into a single entity is called an object. | A class combine data (called data members) and functions (called member functions). |
| Object is a dynamic entity. | Class is a static entity. |
| It is a real-time entity. | It is just a specification or logical entity. |
| It occupies space in memory. | It does not occupy space in memory. |
| It can be manipulated. | It cannot be manipulated because it is not available in the memory. |
| Examples of objects are apple, mango etc. | Examples of class are fruit, person etc. |
No comments:
Post a Comment