سؤال

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.

هل كانت مفيدة؟

المحلول

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.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى softwareengineering.stackexchange
scroll top