Created MyPoint class

changed getDistance method to accept argument MyPoint for the
calculation between itself and another