Skip to main content
MahiDev — Learn. Build. Become AI-ready.

Module 17

Object-Oriented Programming

Learn Python OOP concepts such as classes, objects, inheritance, abstraction, encapsulation, and polymorphism.

Intermediate3 hours 45 min9 lessons

01

OOP Roadmap — Classes, Objects, and the Seven Principles

See the Python OOP roadmap: classes, objects, constructors, encapsulation, inheritance, and polymorphism, and why every value is an object.

Intermediate25 min

02

Classes — Programmer-Defined Types in Python

Learn what a Python class is: a programmer-defined type of data members and methods, with no instance memory until you create an object.

Intermediate25 min

03

Inside a Class — Data Members, Methods, self, and cls

See the parts inside a Python class: instance data, class data, instance methods, class methods, static methods, self, and cls.

Intermediate25 min

04

Objects — Instances, Memory, and Many Values from One Class

Create a Python object from a class, compare the class with its instances, and store different instance data in each object.

Intermediate25 min

05

Constructors — __init__, Default and Parameterized

Initialize a Python object with __init__, compare default and parameterized constructors, and use default arguments when you need both.

Intermediate25 min

06

Destructors — __del__ and the Garbage Collector

Learn how Python releases an unused object with __del__, and how del or None asks the garbage collector to run that cleanup.

Intermediate25 min

07

Encapsulation and Abstraction — Hide a Field, Show a Method

Hide a Python instance field with a double underscore, then let callers use a method so they see the result without the stored detail.

Intermediate25 min

08

Inheritance — Reuse a Base Class in a Derived Class

Reuse Python class features with inheritance, create the object from the derived class, and recognize the five inheritance patterns.

Intermediate25 min

09

Polymorphism — One Method Name, Many Forms

Override a Python method so one name has many forms, then call the original body with super() when the child still needs it.

Intermediate25 min