Polymorphism(cont.) u Polymorphism Use the pointer or reference of the base class to point to any object of its derived class Thus we got transparency that we manipulate those real objects in a type-independent way Same code will represent different objects and make different behaviors Code will remain same if the inheritance hierarchy changesPolymorphism (cont.) ◼ Polymorphism ◼ Use the pointer or reference of the base class to point to any object of its derived class ◼ Thus we got transparency that we manipulate those real objects in a type-independent way ◼ Same code will represent different objects and make different behaviors ◼ Code will remain same if the inheritance hierarchy changes