Question: type Point is a class which contains 2 variablesI may have privacy leaks within 4 methodsline9 to line24. I would be more than grateful if

type Point is a class which contains 2 variablesI may have privacy leaks within 4 methodsline9 to line24. I would be more than grateful if you can tell me why these methods cause privacy leakand how can I fix them.  type Point is a class which contains 2 variablesI may have

Customer.java Point.java Line.java LineTest.java 1 public class Line protected Point start; protected Point end; 5 public Line(Point start, Point end) 4 this.start new Point(start); this.end new Point(end); 9 public Point getstart() return this.start: 13 public Point getEnd() 4 .6 18 return this.end public void setstart(Point x) 9 this.start-x: public void setEnd (Point y this.end-y 23 25 27 public double length) double xd, yd; if (this.start.xcoord-this.end. xcoord) 28 29

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!