appendix classes method and have it call the distance(methodclass point def __sub__selfrhspoint )return self distancerhspoint we could choose to only overload the subtraction operator for use in computing the distance instead of providing both named method and an operator in that casewe would provide the code for computing the distance directly within the sub method definitionclass point def __sub__selfrhspoint )xdiff self xcoord rhspoint xcoord ydiff self ycoord rhspoint ycoord return math sqrtxdiff * ydiff * inheritance pythonlike all object-oriented languagessupports class inheritance instead of creating new class from scratchwe can derive new class from an existing one the new class automatically inherits all data attributes and methods of the existing class without having to explicitly redefine the code this leads to hierarchical structure in which the newly derived class becomes the child of the original or parent class figure illustrates hierarchical diagram of derived classes representing the relationship between different types of bibliography entries the parent-child relationship produced from the derivation of new class is known as an is- relationship in which the derived class is more specific version of the original in the hierarchical class diagram shown in figure book is- publication and is- more specific component of book object object publication publication book book article article webpage webpage figure hierarchical class diagram representing types of bibliography entries