- Get link
- X
- Other Apps
- Get link
- X
- Other Apps
What is object oriented programming ?
Object oriented programming is a computer programming model which organizes design of software around data, objects rather than functions and logic. Objects can be defined as the data fields that has unique behavior and attributes.
The concept of object orient programming is used in several languages like java, C##, python, PHP, Ruby, JavaScript.
In the programming we are using following two methods.
- Procedure Programming: Functions are considered as basic units.
- Object Oriented Programming: Classes are considered as basic units.
Definitions of class and objects are important in OOP concept.
What is a class ?
Class is a template definition of the methods and variables in a particular kind of object. Thus, an object is a specific instance of a class; it contains real values instead of variables. The class is one of the defining ideas of OOP.
What is an Object ?
Objects are things you think about first in designing a program and they are also the units of code that are eventually derived from the process.
The four main principles of object-oriented programming
- Abstraction
- Inheritance
- Encapsulation
- Polymorphism
1. Abstraction
1 Abstraction is defined as a process of handling complexity by hiding unnecessary information from the user.
2.Inheritance
When a class derives from another class, the child class will inherit all public and protected properties and methods from the parent class. In addition, it can have its own properties and methods.
3.Encapsulation
The notion of encapsulation(or OOP Encapsulation) refers to the bundling of data, along with the methods that operate on that data, into a single unit.
Comments
Post a Comment