Interview Kickstart has enabled over 21000 engineers to uplevel.
Attend our webinar on
"How to nail your next tech interview" and learn
### What are Abstract Classes? Abstract classes are classes that contain one or more abstract methods. An abstract method is a method that is declared, but contains no implementation. These abstract methods must be overridden by any non-abstract subclasses. Abstract classes are a way of defining an interface or set of methods that must be implemented by any subclasses. ### What is an Abstract Method? An abstract method is a method that is declared, but contains no implementation. It is up to subclasses to provide an implementation for the abstract method. ### Sample Code Here is an example of an abstract class in Python: ```python from abc import ABC, abstractmethod class Animal(ABC): @abstractmethod def make_sound(self): pass class Cat(Animal): def make_sound(self): print("Meow!") cat = Cat() cat.make_sound() # prints "Meow!" ```