Implemented polygon area calculation with tests.