I have a class A which has become too long. So I have decided to move some of its functions to class B. I have made B inherit from A.
Now there are functions in A, which need functions in B. My question is where should I instantiate class B in class A. I cannot instantiate in the class A constructor, because class B will call the base class to create a never ending loop.
I only want class B to be instantiated once, because class A constructor has object which I only want to initialise once.
I am not even sure if I am making any sense now.