編寫Point類,有兩個屬性x、y,一個方法distance(Point p1,Point p2),計算二者之間的距離

public class Point { private double x; private double y; public Point() {} public Point(double x,double y) { this.x = x; this.y = y; } public static double distance(Point p1,Point p2) { r
相關文章
相關標籤/搜索