Object-Oriented Programming:
Programming that allows the programmer to define not only the data types of a data structure but also the types of functions is object-oriented programming.It is the technique to design a program using classes and objects.
Key Principles of OOP:
- Abstraction
- Encapsulation
- Data hiding
- Polymorphism
- Inheritance
Abstraction:
It is the way of representing the essential data and hiding unwanted data such as background details and explainations.
Data Encapsulation:
It is the way of wrapping the data and functions into a single unit
It enables data hiding and information hiding.
Data hiding:
The way of hiding the implementation details of a class from the outside world by putting data private in class.
Polymorphism:
The ability to function and operator that it can act differently in different classes is known as polymorphism.
Inheritance:
The relationship between two or more classes in which the child class inherits the properties of the parent class.
0 Comments