Question: java code Write a class called Line that represents a line segment between two points. Your Line objects should have the following methods public Line
Write a class called Line that represents a line segment between two points. Your Line objects should have the following methods public Line (Point pi, Point p2) Constructs a new line that contains the given two points public Point getP10) Returns this lino's first endpoint public Point getP26) Returns this line's second endpoint public String toString() Returns a string representation of this line, such as "[(22, 3), (4, 7))
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
