Question: Here is the code: http://homepage.divms.uiowa.edu/~jones/objectotes/24code.txt Thanks In the code distributed on March 22, in class Intersection, two new getter methods have been added, outgoingsize() and

 Here is the code: http://homepage.divms.uiowa.edu/~jones/objectotes/24code.txt Thanks In the code distributed on

Here is the code:

http://homepage.divms.uiowa.edu/~jones/objectotes/24code.txt

Thanks

In the code distributed on March 22, in class Intersection, two new "getter" methods have been added, outgoingsize() and outgoing Get(). There is also a public setter' method, addoutgoing(). These three methods operate on the final private list outgoing a) This means that we have public 'setter' and 'getter' methods to operate on outgoing. That suggests that outgoing might as well be public. Give examples of operations on outgoing that are forbidden to the public as a result of forcing the public to use these methods. b) But the list outgoing is already declared as final. This would seem to imply that outgoing is read-only. Give an example of an operation on outgoing that is forbidden by declaring it to be final, and give some examples of operations that change outgoing that are still permitted despite its being final

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!