Implement a class line with four constructors


Discuss teh below:

A line in the plane can be specified in various ways:

by giving a point (x, y) and a slope m

by giving two points (x1, y1), (x2, y2)

as an equation in slope-intercept form y = mx + b

as an equation x = a if the line is vertical

Q: Implement a class Line with four constructors, corresponding to the four cases above. Implement methods

boolean intersects(Line other)
boolean equals(Line other)
boolean isParallel(Line other)

 

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Implement a class line with four constructors
Reference No:- TGS01934482

Now Priced at $20 (50% Discount)

Recommended (90%)

Rated (4.3/5)