Hey guys I got this assignment for my java class, to create two classes Point2D and Line2D.
Now I've created the Point2D class and it just takes in x,y coordinates and creates a point. It has a few methods, getX, getY and distanceTo(point b)
What I need to do now is create a Line2D class which also should have a few methods, but I'm stuck at implementing the constructor which should take two point2D variables and create a line between point a and point b.
So basically the constructor should look like this:
public Line2D(Point2D a, Point2D b)
I'm having real trouble getting my head around what should be inside the brackets, so I'm kinda stuck at the moment. Any pointers/help would be greatly appreciated.