@Test void midpoint() { assertEquals( Line.midpoint(new Point(2, 2), new Point(4, 4)), new Point(3, 3)); }
public static Point midpoint(Point p1, Point p2) { return new Point((p1.x + p2.x) / 2, (p1.y + p2.y) / 2); }
Line { public static Point midpoint(Point p1, Point p2) { return new Point((p1.x + p2.x) / 2, (p1.y + p2.y) / 2); } }
Line { public static Point midpoint(Point p1, Point p2) { return new Point((p1.x + p2.x) / 2, (p1.y + p2.y) / 2); } Line(Point p1, Point p2);  Line(Point point, double slope);  Line(double slope, double yIntercept); }
Line { public static Point midpoint(Point p1, Point p2) { return new Point((p1.x + p2.x) / 2, (p1.y + p2.y) / 2); } Line(Point p1, Point p2);  Line(Point point, double slope);  Line(double slope, double yIntercept); double perpendicularSlope(); double evaluate(double x); Point intersect(Line l2); Point nearestLinePoint(Point p); boolean isVertical(); static Point midpoint(Point p1, Point p2); static double distance(Point p1, Point p2); @Override boolean equals(Object o); }
Line { public static Point midpoint(Point p1, Point p2) { return new Point((p1.x + p2.x) / 2, (p1.y + p2.y) / 2); } Line(Point p1, Point p2);  Line(Point point, double slope);  Line(double slope, double yIntercept); double perpendicularSlope(); double evaluate(double x); Point intersect(Line l2); Point nearestLinePoint(Point p); boolean isVertical(); static Point midpoint(Point p1, Point p2); static double distance(Point p1, Point p2); @Override boolean equals(Object o);  }