Itential interview question

Why would you use polymorphism and inheritance in coding?