Lesson-07 | Class Method & Static Method | [OOP in Python]

Опубликовано: 15 Октябрь 2024
на канале: Learning Orbis
3,424
59

This is the lesson number 07 of the lesson series on Object Oriented Programming (OOP) in Python. It will be a complete course with the aim is to cover almost everything needed in Object Oriented Programming.

In this lesson we create class method and the static method. We have already seen and used instance methods and this video covers other two types of methods.

Link to complete playlist:
   • Object-Oriented Programming in Python  

Lesson Code:
https://github.com/MAN1986/OOP-in-Pyt...


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Review Questions of the Lesson
1. Create a method named as regStds that must return the list of students registered in the subject (only one subject) provided as input argument. Decide whether it should be an instance method, class method or static method. Display a sample output.
2. In a class method can we use the name of input argument other than cls ? If yes, should we use some other name?


#OOP #ObjectOrientedProgramming #Python