Object Oriented Programming in Python(OOP)

Object Oriented Programming in Python(OOP)

Object Oriented Programming In Python (OOP)


Object Oriented Programming  (OOP) is a programming methodology that uses object and class and used to  implement real world scenarios. Concepts of OOPs are taken from real world. Features of OOPs are given below:

1. Object
2. Class
3. Abstraction
4. Encapsulation
5. Inheritance
6. Polymorphism

1. Object-

According to OOPs, every real world entity is an object which consists of state and behaviour. Attributes of the object is denotes its state and functionality of object is known as its behaviour  For example, according to OOP a pen is also an object where pen name, its company name denotes. Its state and pen is used to write denotes its behaviour (i.e. functionality).

2. Class-

Class is a concept that came from classification which means objects that have similar types of state and behaviour are grouped into a category known as class

 

3. Abstraction-

According to OOPs, representing the necessary information or features to user and hiding the complex (or internal) information from user is called abstraction

 

4. Encapsulation-

The ability to combine state and behaviour into a single logical entity like class is called encapsulation

 

5. Inheritance-

Inheritance is the process by which one object acquires the state and behaviour of another object. For example, a child gets the state and behaviour of his father

 

6. Polymorphism-

Polymorphism  means an ability to have more than one form and behaving differently in ever form. For example consider the + operator. For two numbers, the operator performs the addition operation and in case of two strings the same + operator performs the concatenation operation

Leave a Reply

Your email address will not be published. Required fields are marked *