Python OOPS – Introduction
Python is an object-oriented and as well as procedure oriented programming language. With the help of the Python Object-Oriented approach, we can easily develop applications. In Python, we can easily create and use classes and objects.
Here is the list of the major principles of the Python OOPS(object-oriented programming system).
- Object
- Class
- Method
- Inheritance
- Polymorphism
- Data Abstraction
- Encapsulation
Let’s have a one-line overview of all these concepts. Further, we are going to know deeply about all these things with our next Tutorials.
Objects
In python almost everything is an object. Python Objects are real-time identities having some behaviour and properties.
Class
Class are the blueprint or a set of instructions to create a specific type of object. It has set of instructions like functions, variables etc. in their block.
Method
Method is a block of some set of instructions. We can use this block in future using a single word.
Inheritance
Python Inheritance allows us to define a class that inherits all the methods and properties from another class.
Polymorphism
Python, Polymorphism allows us to define methods in the child class with the same name as defined in their parent class.
Data Abstraction
Data abstraction refers to providing only essential information about the data to the outside world, hiding the background details or implementation.
Encapsulation
Encapsulation is the packing of data and functions operating on that data into a single component and restricting the access to some of the object’s components. The meaning of encapsulation is that the internal representation of an object is generally hidden from view outside of the object’s definition.
Let’s learn all these in deep with the help of easy example step by step.
Exercises & Assignments |
---|
No Content Found. |
Interview Questions & Answers |
---|
No Content Found. |