I want to have a base class that contains a member object. When I extend the base class, I want the member object to be of a type derived from the original type. I can do that with the following strategy. (Note: Please ignore my horrendous style. The code was formatted for space.)
I would like to do this without the "NormalClass". Semantically, there is a class with certain behavior, and an extension of the class with enhanced behavior. A 3rd class with the sole purpose of providing the default member object to the base class causes confusion.
Can I use a member object (not reference) in the BaseClass and replace this member object with an object of a derived class in the ExstendedClass?