Simple factory model
The simple factory pattern is an innovative pattern of classes, also known as static factory method pattern (Static FactoryMethod Pattern), which is responsible for creating instances of other classes by defining a class specifically, and the created instances usually have a common parent class. In the past, we didn't know about simple factories. Every time we need to use an object class, we first need to know the file path that contains the class, and we need to include the header file of the class. When we need to use a lot of classes to implement a function, we will find that we need to include a large number of header files, which is particularly uncomfortable. So is it possible to have a class that specifically manages these class? The answer is yes. The simple factory mentioned this time implements this function, and its responsibility is particularly simple, which is to create an instance of the class and return it to the superior.
`