According to Dependency Inversion Principle, a class should not interact with another directly, it should be done using abstraction. That being said, objects are made of type abstract class or interface and are referred to class implementing it. Now my question is if that is the case how can we use additional methods defined in child class? And if not, what is the point of having capability of defining additional methods in child class?
My question is if we try to follow above principle, then we can never use those additional methods. Or there is something that i am missing?
Please reply if this question is not understandable, i will add an example.