Python Classes Tutorial #4 | Inheritance (Creating a Subclass)

Опубликовано: 06 Март 2024
на канале: Aikonic
1,171
46

In part four of this tutorial series on classes in Python, we are going to discuss the concept of inheritance and create a subclass called “ElectricCar” which inherits features from the superclass “Car”. Inheritance in Python is a key object-oriented programming concept where a new class, known as the subclass, can inherit attributes and methods from an existing class, called the superclass. This allows for code reuse, promoting a modular and efficient approach to software development. Subclasses can extend or override inherited features, facilitating the creation of specialized classes with shared functionalities.

Please like and subscribe if you found this video helpful!

Link to the playlist for this series:    • Classes in Python  


00:00 - Intro
01:06 - Creating a Subclass
02:12 - Initializing the Constructor Method
03:25 - Super Function
04:34 - Adding Additional Attributes
05:54 - Creating a New Method
08:07 - Overriding a Method
09:42 - Creating a Instance of the Subclass
11:53 - Conclusion


На этой странице сайта вы можете посмотреть видео онлайн Python Classes Tutorial #4 | Inheritance (Creating a Subclass) длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Aikonic 06 Март 2024, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 1,171 раз и оно понравилось 46 зрителям. Приятного просмотра!