The abstract factory pattern is closely related to the factory method pattern. Sometimes, the problem requires the creation of multiple distinct objects that are somehow related. In such a case, we could introduce multiple factory methods, but then we have to manage them separately, which increases the possibility of implementations becoming out of sync. This approach also makes it hard to share common logic and state between those factory methods. A better way is to introduce an abstract factory, which functions as a factory for factories.
If a factory method is a kid with a cookie cutter, an abstract factory is a kitchen chef. Give them a set of cooking tools and they'll make you a great dish. Give them access to a baking set and they'll make you a perfect pie.
We can implement abstract factory in the same object-oriented way that was used in the factory...