Vidyalelo
Python · Q23

Advanced OOP Concepts

Programming · Python · question 23

Q23

What is the role of the @abstractmethod decorator in advanced OOP?

A.
To create abstract classes
B.
To prevent method overriding
C.
To indicate that a method must be overridden in subclasses
Answer
D.
To define a method as static

Answer: Option C

Solution

Answer: Option C
Solution:
The @abstractmethod decorator indicates that a method must be overridden in subclasses.