Pregunta

In Elements of Reusable Object Oriented software by Erich Gamma and friends, the intent for Abstract Factory Pattern says:

Provide an interface for creating families of related or dependent objects without specifying their concrete classes.

Can anyone explain in clearer terms what does author mean by related or dependent here.

¿Fue útil?

Solución

Wikipedia says that "The abstract factory pattern provides a way to encapsulate a group of individual factories that have a common theme without specifying their concrete classes."

Take a look at the picture below.

enter image description here

"Related" here means that all of the concrete factories create buttons.

Licenciado bajo: CC-BY-SA con atribución
scroll top