1 The course explains
1.1 Definitions
1.2 Application of this scenario
1.3 advantage
1.4 shortcomings
1 The course explains
1.1 Definitions
Determined by a factory object to create an instance of what kind of product class.
1.2 Application of this scenario
3.1 Object factory class is responsible for creating relatively small;
3.2 client only knows the parameters passed factory class, how to create objects do not care.
1.3 advantage
Only need to pass in a parameter, you can get a subject in need, without knowing the details of creating
1.4 shortcomings
a duty factory class heavy, adding new products, need to modify the factory class determination logic, contrary to the principle of opening and closing ;
B can not form a hierarchical structure based on inheritance.