Abstract Factory pattern -- Structural example with interface
Can someone show me how to do the sample example of abstract factory: "Abstract Factory Pattern - Structural Example" as outlined in this site, but with using an Interface?
Amees Bai, Jul 16, 2011
You could replace the AbstractFactory class with this:
You could also replace the abstract Product base classes (AbstractProductA and AbstractProductB) with this:
You'll then have to remove all "override" keywords, because now your classes implement the interface instead of overriding the base class.
Hope this helps.
Mathieu Lavigne, Aug 01, 2011