In this post, we’ll see how Factory method Design Pattern come into picture, what advantages it will provide and how it help in implementing loose coupling concept.
Below picture shows Car factory that produce different car depending on it’s feature and model. For instance, it produces BMW 1 series, BMW 2Series, BMW M3 etc. Whatever order we placed for car, factory will produce.
This same concept applies to Factory Design pattern.