filmov
tv
Lesson-16 | Enumeration Class | [OOP in Python]

Показать описание
This is the lesson number 16 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 will see concept of Enumeration Class. An enumeration class has members as the objects having names and values.
Link to complete playlist:
Lesson Code:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*Review Questions of the Lesson*
1- Values of more than one members can be same. Give one such example!
2- The value of a member can be a list. Suppose we have Subject enumeration class with member names as Subject short name and value will be a list containing Subject Code, Full Name and Credit Hours in a list. One example member is:
CP2=['MCT-243','Computer Programming-II',2]
What will be the best way to access subject code or name or credit hours? [Hint: Enumeration class members are objects like objects of regular class. And they can have attribute. Think of adding code, name and credit hours as property of object]
#OOP #ObjectOrientedProgramming #Python
In this lesson we will see concept of Enumeration Class. An enumeration class has members as the objects having names and values.
Link to complete playlist:
Lesson Code:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*Review Questions of the Lesson*
1- Values of more than one members can be same. Give one such example!
2- The value of a member can be a list. Suppose we have Subject enumeration class with member names as Subject short name and value will be a list containing Subject Code, Full Name and Credit Hours in a list. One example member is:
CP2=['MCT-243','Computer Programming-II',2]
What will be the best way to access subject code or name or credit hours? [Hint: Enumeration class members are objects like objects of regular class. And they can have attribute. Think of adding code, name and credit hours as property of object]
#OOP #ObjectOrientedProgramming #Python
Комментарии