Send Close Add comments: (status displays here)
Got it!  This site uses cookies. You consent to this by clicking on "Got it!" or by continuing to use this website.nbsp; Note: This appears on each machine/browser from which this site is accessed.
Classes, polymorphism and subclassing


1. Classes, polymorphism and subclassing

2. Polymorphism
Polymorphism, from the Greek, means having many forms.

In programming, object-oriented programming allows polymorphism.

This page provides some examples in various languages of inheritance and polymorphism.

3. Python
In the following, the class Verse2 is a subclass of class Verse1.

Here is the Python code.

Here is the output of the Python code.


4. End of page