Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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. image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 15th International Conference Dexa 2004 Zaragoza Spain August 30 September 3 2004 Proceedings Lncs 3180

Authors: Fernando Galindo ,Makoto Takizawa ,Roland Traunmuller

2004th Edition

3540229361, 978-3540229360

More Books

Students also viewed these Databases questions