adplus-dvertising
frame-decoration

Question

In factory method pattern, the framework must instantiate classes but it only knows about the abstract classes, which it cannot initiate. How would one solve this problem?

a.

encapsulating the knowledge of which document subclass to is to be created

b.

moving this knowledge out of the framework

c.

instantiating the application specific documents without knowing their class

d.

all of the mentioned

Answer: (d).all of the mentioned

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. In factory method pattern, the framework must instantiate classes but it only knows about the abstract classes, which it cannot initiate. How would one solve this problem?