Hierarchical inheritance
When more than one derived classes are created from a single base – it is called hierarchical inheritance.
In this program, we have a parent (base) class name Details and two child (derived) classes named Employee and Doctor.
Python code to demonstrate example of hierarchical inheritance
Output
need an explanation for this answer? contact us directly to get an explanation for this answer