Hi All,
Every creational
pattern states that
Sometimes, an Application (or framework) at runtime, cannot anticipate the class of object that it must create. The Application (or framework) may know that it has to instantiate classes, but it may only know about abstract classes (or interfaces), which it cannot instantiate. Thus the Application class may only know when it has to instantiate a new Object of a class, not what kind of subclass to create.
I am having problem particularly with the statement
"....can not anticipate the class of object that it must create, may only know when it has to instantiate a new object of a class ,not what kind of subclass to create...." why can't we anticipate the class of object that's going to be created? could you please give me some real world example in easy-to-undestand way?
thanks.
[ August 18, 2004: Message edited by: t ray ]