Abstract Factory Pattern
Abstract Factory Pattern
Abstract Factory Pattern
DURGA SOFTWARE SOLUTIONS ,202 HUDA Maitrivanam, Ameerpet , Hyd. Ph: 040-64512786 Page 1
JAVA Means DURGA SOFT
Def: Provide an interface for creating families of related or dependent objects without
DURGA SOFTWARE SOLUTIONS ,202 HUDA Maitrivanam, Ameerpet , Hyd. Ph: 040-64512786 Page 2
JAVA Means DURGA SOFT
Intent:
Abstract Factory offers the interface for creating a family of related objects, without
explicitly specifying their classes.
Application Areas: We should use the Abstract Factory design pattern when:
A system should be independent of how its products are created, composed,and
represented.
A system should be configured with one of multiple families of products.
A family of related product objects is designed to be used together, and you need to
enforce this constraint.
You want to provide a class library of products, and you want to reveal just their
interfaces, not their implementations.
Ex:
DURGA SOFTWARE SOLUTIONS ,202 HUDA Maitrivanam, Ameerpet , Hyd. Ph: 040-64512786 Page 3
JAVA Means DURGA SOFT
DURGA SOFTWARE SOLUTIONS ,202 HUDA Maitrivanam, Ameerpet , Hyd. Ph: 040-64512786 Page 6
JAVA Means DURGA SOFT
DURGA SOFTWARE SOLUTIONS ,202 HUDA Maitrivanam, Ameerpet , Hyd. Ph: 040-64512786 Page 7
JAVA Means DURGA SOFT
DURGA SOFTWARE SOLUTIONS ,202 HUDA Maitrivanam, Ameerpet , Hyd. Ph: 040-64512786 Page 8