The Factory patterns decouple clients from products by taking advantage of interfaces in two ways?
(a) The generator class with the factory methods cannot be changed, disallowing variability in factory method implementations
(b) Instances of a variety of classes that implement the product interface can be returned by a factory method, allowing great flexibility in results
(c) All of the mentioned
(d) None of the mentioned
I had been asked this question by my school principal while I was bunking the class.
My question comes from The Generator Category, Factory Patterns and Singleton Patterns in division Visibility, Accessibility and Information Hiding of Software Architecture