/* Manipulating the descartes library to display points, and * to perform some related operations with those points. */ #include #include #include "descartes.h" #define MAXPOINTS 15 int DisplayPoint(point_t p) { /* BEGIN ANSWER (a) -- do not delete this line */ // ADD YOUR CODE HERE /* END ANSWER (a) -- do not delete this line */ } int DisplaySegments(void) { /* BEGIN ANSWER (b) -- do not delete this line */ // ADD YOUR CODE HERE /* END ANSWER (b) -- do not delete this line */ } int BoundingBox(void) { /* BEGIN ANSWER (c) -- do not delete this line */ // ADD YOUR CODE HERE /* END ANSWER (c) -- do not delete this line */ } /* This 'main' method is to allow you to test your functions */ int main (void) { OpenGraphics(); int choice; printf("Type 1 for DisplayPoint, 2 for DisplaySegments, 3 for BoundingBox: "); scanf("%d", &choice); if (choice == 1) DisplayPoint(GetPoint()); else if (choice == 2) DisplaySegments(); else if (choice == 3) BoundingBox(); else printf("Not a valid choice.\n"); CloseGraphics(); return EXIT_SUCCESS; }