#include "interface.h" #include class ShapeFactory { public: std::map map; auto getCircle(string color)->Shape* { auto iter = map.find(color); if (iter != map.end()) { return iter->second; } else { Shape *circle = new Circle(color); map.insert(std::make_pair(color, circle)); cout << "Creating circle of color : " + color << endl; return circle; } } };