An object is a declared instance of a data type, which includes standard C++ data types as well as objects of classes. In other words, they are the variables that you declare in the class. In OOP, objects represent real world entities, such as students, doctors, and bank accounts. These objects can interact with each other by sending or receiving messages.
An object has the following three main characteristics:
i. It has a state
ii. It may or may not display a behavior
iii. It has a unique identity
No comments:
Post a Comment