Factory design pattern
no vote
Detailed presentation of the Factory design pattern of this project, in project development will often use this pattern. Factory mode functions: 1, provides an interface for creating objects; 2, delays to the subclass of object instantiation in the finish. Specifically look at the code: