All right so let's try to summarize some of the things that we've learnt about the different Factory
Design Patterns so we saw that a factory method is essentially just a function or static method that
creates particular objects and a factory can actually take care of the object creation entirely So it's
a separate component a separate class which can take care exclusively of all creation.
So this is kind of the Single Responsibility Principle taken to its limit because you've taken an object.
But you're saying that the constructors aren't good enough so you're putting everything into a factory.
Now a factory can be an external component so it can live side by side with the thing it creates or
it can be in that class and there are certain benefits to having an asset class such as access to private
members because otherwise what you end up doing is you end up declaring the factory as a friend class
of whatever object is being created in that factory which can break the open closed principle.
If you're making the factory a lot later than you're making the actual object.
So we also looked at hierarchies of objects and how factories can be used to create those objects and
it's not such a common task nowadays.
But still this is the second half of the factory design pattern according to the gang of four so we
looked at the abstract factory as well.