Inheritance (OO Python Tutorials)

Поділитися
Вставка
  • Опубліковано 16 вер 2024
  • Lesson 02 - Hello and welcome back to this video series on Object Oriented Programming in Python. In the previous video, you learned what Object Oriented Programming, or OOP, is and how to define classes and create objects in Python. In this video, you will learn how to use class inheritance, which is a powerful feature of OOP that allows you to reuse and extend existing code.
    Class inheritance is a mechanism that allows you to create a new class that inherits the attributes and methods from another class. The class that inherits from another class is called the child class or the subclass, and the class that is inherited from is called the parent class or the superclass. By using inheritance, you can avoid writing duplicate code and make your code more modular and maintainable.

КОМЕНТАРІ • 1