#include #include #include class point { public: double x; double y; point(double xx, double yy) : x(xx), y(yy) {}; point() : x(0), y(0) {}; }; std::map database; void routing_clear() { database.clear(); } /* defines or changes the coordinates of a point */ int routing_set_point(const char * name, double x, double y) { point & p = database[name]; p.x = x; p.y = y; return 1; } /* compute the total distance traveled in the given path. A path is a comma-separated list of point names. The result must be -1 if any one of the points is undefined. */ double routing_total_distance(const char * path); // Exercise