G
Guest
Hi, I browsed for a related question/answer without luck, so here it goes:
Is there a known pattern that would allow me to promote an object of class A
to subclass B which inherits from A?
In other words, how can I turn a point into a circle or a dog into a
dalmatian? I know I can do the other way around with casting.
Thanks in advance.
Is there a known pattern that would allow me to promote an object of class A
to subclass B which inherits from A?
In other words, how can I turn a point into a circle or a dog into a
dalmatian? I know I can do the other way around with casting.
Thanks in advance.