| Modifier and Type | Field and Description |
|---|---|
private LineSegment |
Square.ls1
A square is defined by two line segments that have a common end-point.
|
private LineSegment |
Rectangle.ls1
A Rectangle is defined by two line segments that have a common end-point.
|
private LineSegment |
Square.ls2
A square is defined by two line segments that have a common end-point.
|
private LineSegment |
Rectangle.ls2
A Rectangle is defined by two line segments that have a common end-point.
|
| Modifier and Type | Method and Description |
|---|---|
LineSegment |
Square.getLs1()
Getter for LineSegment 1
|
LineSegment |
Rectangle.getLs1()
Getter for LineSegment 1
|
LineSegment |
Square.getLs2()
Getter for LineSegment 2
|
LineSegment |
Rectangle.getLs2()
Getter for LineSegment 2
|
| Modifier and Type | Method and Description |
|---|---|
Point |
LineSegment.intersection(LineSegment lineSegment)
A method that computes and returns the Point of of intersection of 'this' line
segment and the line segment specified in the parameter.
|
boolean |
LineSegment.oneCommonEndpoint(LineSegment lineSegment)
Method that checks if 'this' line segment has one common end-point with the specified
line segment.
|
| Constructor and Description |
|---|
Rectangle(LineSegment ls1,
LineSegment ls2)
A constructor for the Rectangle object.
|
Square(LineSegment ls1,
LineSegment ls2)
A constructor for the Square object.
|