inheritance and polymorphism inheritance in object-oriented code allows subclass to inherit some or all of the attributes and methods of its superclass(espolymorphism basically means that given category of objects can exhibit multiple identities at the same timein the sense that cat instance is not only of type catbut also of type fourlegged and animalall at the same time purdue university