Point2D classes for exercise 2