The Concept of Object Oriented Programming
There are following a concept of OOP.
1.Objects
2.Classes
3.Data Abstraction & Encapsulation
4.Inheritance
5.Polymorphism
6.Dynamic Binding
7.Message Passing
Objects
⇒Object simply means Instance of class.
⇒Object is also known as Blue-Print of Class.
⇒Objects are the basic run-time entities in an O.O System.They may represent a person, a bank account, a table of data or any item that the program has to handle.
Classes
A class is a collection of Data members, methods and Constructor in a single unit are called class.
Syntax:
Class ClassName
{
........;
........;
}
Data Abstraction & Encapsulation
Abstraction refers to the act of representing essential features without including the background details or explanation. The wrapping up of data and functions into a single unit is known as encapsulation.
Inheritance
Inheritance is processed by which object of one class acquire the properties of objects of another class.Inheritance provides the idea of reusability.
Polymorphism
One name multiple forms is known as polymorphism.Greek term poly means many morphisms means in a form.
Dynamic binding
Dynamic binding means that the code associated with a given procedure call is not known until the time of code at run0time.
Message passing
It makes easier to talk about the binding system that directly models or simulate their real-world counterparts.