August 17, 2003

Creation Pattern – Abstract Factory

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

Example:

if( os = “WINDOWS” )

osFactory = abstractFactory.getFactory(“Win”);

else if( os = “MOTIF” )

osFactory = abstractFactory.getFactory(“Motif”);

MainWnd = osFactory.createWin();

Links: