Is the Factory Method Pattern more flexible than Simple Factory?
问题 I've been reading the book Head First: Design Patterns, which I have found to be a good introduction to design patterns. However, I've got a question about a claim they make in Chapter 4: They define the "Simple Factory" pattern as follows (Java pseudocode): public abstract class Product { // Product characteristics // Concrete Products should subclass this } public class SimpleFactory { public Product createProduct(){ // Return an instance of some subclass of Product } } public class Store {