When you look at the person on the street, you see the person as an object. Generally, an object is defined by two features: attributes and behaviors. An attribute is a characteristic of an object. The attributes differentiate between the various objects. A person has attributes, such as first name, height, weight, age, hair color, etc. A person also has behaviors, such as breathing, walking, crying, etc. As you may have noticed, a behavior is an action that an object is capable of performing. In other words, behavior of an object is what the object can do.
Object-oriented programming (OOP) is a computer programming paradigm that uses objects and relationships between them to design applications. Objects are building blocks of object-oriented (OO) program. Generally speaking, the OO program is a collection of objects. In computer language an attribute is data associated with an object and behavior is something performed by an object. The aim in OOP is to translate attributes and behaviors of a real-world object into class that consists of attributes and methods understood by a machine. The data of a class is represented by attributes, while methods implement the required behavior of a class.
The abstract object is used to describe a real object. In OOP first we create an abstract object and then use the abstract object to create a real object. A real object is called an instance of the abstract object. Therefore, an instance is a real object. In other words, an instance is the computer’s version of a real object. OOP aims to mimic real-world objects by defining a class. Specifically, you create an object within a program by defining a class. A class consists of data members and member methods. Data members are used to store attributes of an object. Member methods define an object’s behavior. A behavior is emulated in a program by a method. A class is a template of blueprint that defines attributes and methods of a real-world object.