Write a program to get the details of the line passing through the given points. Also implement the toString method for Line class, such that the details are printed as shown in the requirements
Input (Integer, Integer, Integer, Integer) |
Output (Line) |
2, 3, 1, 5 |
y=-2.0x+7.0 |
12, 12, 14, 18 |
y=3.0x-24.0 |
0, -6, 3, 0 |
y=2.0x-6.0 |
-4, 0, 0, -20 |
y=-5.0x-20.0 |
3, 18, 2, 14 |
y=4.0x+6.0 |