java编程:编Point类,有两属性x,y,一个方法distance(Point p1,Point p2),算两点距离,我用内部类做不最好是用手动输入坐标点的

问题描述:

java编程:编Point类,有两属性x,y,一个方法distance(Point p1,Point p2),算两点距离,我用内部类做不
最好是用手动输入坐标点的

import java.util.Scanner;public class Point { private double x; private double y; public Point() { this(0,0); } public Point(double x, double y){ this.x = x; this.y = y; } public static void main...