You must do this assignment using the RectangleStructs project that you checked out from your individual SVN repository in class.
Be sure to check out that project into your Eclipse C workspace, not your Python workspace.
(35 points) This problem involves defining and using some structs to model filled rectangles on the Cartesian (x, y) plane. A rectangle is represented by two points, point1 and point2, indicating opposite corners of the rectangle. The figure below shows four specific rectangles that the provided test code will use to test your code. The labels (r1 .. r4) are the variable names used in the provided test code for those rectangles.
The parts of this problem must be completed in the order given; testing of the later steps depends on your implementation of the earlier steps. Part (b) should be completed in file rectangle.h and the remaining parts of the problem should be completed in rectangle.c. The file RectangleStructs.c should NOT be modified.
(2 pts) Now write a function Rectangle makeRect(int x1, int y1, int x2, int y2) in rectangle.c that makes a Rectangle from the given coordinates, where point1 has coordinates (x1, y1) and point2 has coordinates (x2, y2). Any opposite corners may be given; for example r1 in the figure could be generated using any one of the following:
The function stub is already included. At this point your code should run but it won’t pass any of the tests in main() yet.
main() that tests your function. main() that tests your function. main() that tests your function. main() that tests your function. main() that tests your function. main() that tests your function. When your code is working, commit it to your repository.
Watch the set of videos assigned for next time and complete the take-home quiz. The main schedule page contains links to the videos, slides, and quiz. Paper copies of the quiz are due at the start of next class.