Question: I need help writing this program in java, it includes creating 2 classes. Please help, thank you! Requirements for Point class The point class represents

I need help writing this program in java, it includes creating 2 classes. Please help, thank you!  I need help writing this program in java, it includes creating

Requirements for Point class The point class represents a point on the screen. On the screen, the top-left corner is considered point (0,0). When moving down, the y- coordinate increases, to move right, the x-coordinate increases. * Instance variables: xcoord and ycoord, both of type int. Constructors: a copy constructor and a constructor that takes initial values for the x-and y-coordinates. Methods o Getter and setter methods for both instance variables. x- and y-coordinates must be non-negative o moveUp, moveDown, moveRight and moveLeft which al take an argument of type int which represents how far to move o distance which takes another Point as an arqument and returns the euclidean distance between itself and the point provided as an argument. The value returned should be of type double. o equals which takes another Point as an argument and returns true if it has the same x- and y-coordinate as the Point provided as an argument. Requirements for Line class e Instance variables: start and end, both of type Point. Both instance variables must be completely encapsulated. Make sure to prevent all privacy leaks * Constructors: one constructor that takes a start and end point as an argument. Methods o getter and setter methods for both instance variables. o length which takes no argument and returns the length of the line as a double. (The distance between the start and end point.)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!