Is there a way to access a function of subclass by any other class? I have the superclass A, and its subclass B and C.