package a202; import a202.Point; public class Line { Point a; Point b; double length; public Line(Point inputA, Point inputB){ a = inputA; b = inputB; length = a.distanceTo(b); } public double getLength(){ return length; } public static void main(String[] args){ Line carl = new Line(new Point(0, 3), new Point(4, 0)); System.out.println(carl.getLength()); } }