#include #include #include using Shapes::Shape; int main() { std::string request; std::list s; Shape tmp; while (request != "q" ) try { std::cout << "Enter the name of a shape (q to quit)" << std::endl; std::cin >> request; if ( request != "q" ) { tmp = Shapes::God->make(request); s.push_back(tmp); } } catch (const Shapes::Exception& e) { std::cout << request << " is unsupported " << std::endl; } std::list::iterator it; for ( it = s.begin(); it != s.end(); ++it ) (*it)->draw(); return 0; }