public class Line extends Shape
Constructor and Description |
---|
Line(Point2D p1,
Point2D p2)
Create a line with end points
p1 and p2 . |
Modifier and Type | Method and Description |
---|---|
double |
getArea()
Returns zero (the area of the line).
|
Point2D |
getPoint1()
Returns the first end point of the line.
|
Point2D |
getPoint2()
Returns the second end point of the line.
|
getHeight, getPosition, getWidth
public Point2D getPoint1()
public Point2D getPoint2()
public double getArea()
getArea
in class Shape
Shape.getArea()
0