I have ClassA and ClassB, with ClassA being the superclass.
ClassA uses NodeA, ClassB uses NodeB.
First problem: method parameters. ClassB needs NodeB types, but I can't cast from the subclass to the superclass. That means I can't set properties which are unique to NodeB's.
Second problem: When I need to add nodes toClassB, I have to instantiate a new NodeB. But, I can't do this in the superclass, so I'd have to rewrite the insertion to use NodeB.
Is there a way around it or am I gonna have to rewrite the whole thing?