Update PolygonArea.java

Added contracts and cleaned up style