What are the differences between Abstract Factory and Factory design patterns?

后端 未结 17 1148
醉话见心
醉话见心 2020-11-22 01:57

I know there are many posts out there about the differences between these two patterns, but there are a few things that I cannot find.

From what I have been reading,

17条回答
  •  情歌与酒
    2020-11-22 02:31

    Abstract Factory is an interface for creating related products, but Factory Method is only one method. Abstract Factory can be implemented by multiple Factory Methods.

    Abstract Factory UML

提交回复
热议问题