- In object-oriented programming we divide program into multiple object.
“An Object is a thing in real world which has certain properties and method.”
- It may be any place, person, bank account, bill or any item.
- The definition of object oriented programming can be given as,
“Object oriented programming is technique to divide program into multiple partition which has data and method and it is known as class. We can create multiple copies from that class.”
- The structure of the Object oriented program is shown in the below figure:
- Two objects can communicate via the function without knowing the data of each another.
- We can represent a class by two ways as shown in the below figure:
- Out of these two methods, first method to represent object is widely used.
Characteristics of object-oriented programming language:
- It emphasis on data rather than algorithm.
- Program is divided into multiple portions known as Class/objects.
- Class: We are using class as user defined data type to create object.
- Data encapsulation: Data and function both are combined into one portion known as class.
- Data hiding: Data cannot be accessed outside the class and provides the fundamental of private and public data.
- Interface: Object can communicate via the Interface.
- Inheritance: We can create one object which acquire properties and method of another object.
- Polymorphism: We can use one method for the multiple uses.
- Dynamic binding: Two procedures are linked during the time of execution.
- Follows up bottom-up