#include "abstractfactory.h" class FactoryProducer { public: FactoryProducer(){} AbstractFactory *getFactory(string type) { if (type.compare("ShapeFactory") == 0) { return new ShapeFactory(); } else if (type.compare("ColorFactory") == 0) { return new ColorFactory(); } else { return nullptr; } } };