Abstraction
Abstraction separates ideas from specific instances of those ideas.
An abstract method is declared, but contains no implementation.
Abstract classes cannot be instantiated, and require subclasses to provide implementations for the abstract methods.
Python Example
For more Python class related examples, see:
# Import the python abstract base class. import abc ABC = abc.ABCMeta('ABC', (object,), {'__slots__': ()}) # Define an abstract class which must contain at least one abstract method. class AbstractPlane(ABC): __metaclass__ = abc.ABCMeta @abc.abstractmethod def takeoff(self): ''' data ''' @abc.abstractmethod def land(self): ''' data ''' # Define a concrete class using an abstract class. class Transport(AbstractPlane): def fly(self): print('flying') def takeoff(self): print('taking off') def land(self): print('landing') # Instantiate and use an object. transport1 = Transport() transport1.takeoff() transport1.fly() transport1.land()