Curriculum design patterns factory method design pattern succinctly 5-2 codingn

Factory method to solve the problem the same product class

Abstract factory method to solve the problem the same product cluster

 

Product rating:

There are automobile Volkswagen, Chang'an Automobile, Audi cars. Changan Auto and Audi, Volkswagen belong to the same product level.

 

Product Family:

Chongqing Changan Automobile, motorcycle, bicycle Chang.

Guess you like

Origin www.cnblogs.com/1446358788-qq/p/11266207.html