The concept of object-oriented programming was seen to solve many problems, which procedural programming did not solve. In object-oriented programming, everything mimics just like a real-world object. In the real world, everything is an object. An object can have state and behavior. An object in the real world can communicate with another object. For example, a dog object in the real world has state and behavior. OOPs is based on four pillars. They are:
- Polymorphism
- Inheritance
- Abstraction
- Encapsulation
OOPs is a vast topic that needs to be covered at the intermediate level. In case of Python programming, however, we will cover some key concepts in this chapter.
- Class: Class is considered as a blueprint for object creation. It can be understood as a factory to produce objects. It provides a template for creating an object and specifying its behavior through means of methods and state through means of variable instance name.
- Objects: They can be considered...