Task 1: Rectangle Area

Go down

Task 1: Rectangle Area

Post  Admin on Sat Jun 04, 2011 8:56 am

Given the coordinates of the bottom-left and top-right corners of two rectangles, calculate total area covered by the two rectangles. The two rectangles may or may not overlap.

Testing Data:
Rectangle 1: Bottom Left: (1,1), Top Right: (3,4)
Rectangle 2: Bottom Left: (2,3), Top Right: (6,7)

1. First find the areas of the two rectangles
2. What is wrong with just adding the areas together?


Posts : 21
Join date : 2011-06-04

View user profile http://nsbcoder.board-directory.net

Back to top Go down

Back to top

- Similar topics

Permissions in this forum:
You cannot reply to topics in this forum