Question: 2. Two different programming teams have implemented a class named Rectangle. One team provided accessors to get and set the location (origin), width, and height

 2. Two different programming teams have implemented a class named Rectangle.

2. Two different programming teams have implemented a class named Rectangle. One team provided accessors to get and set the location (origin), width, and height of a rectangle, while the other team chose to make the origin, width, and height fields public so that they can simply be directly accessed (read and/or changed). The second team argues that if you have accessors which allow you to both get and set all the values in the rectangle, there is no difference in having the fields public. Explain why the second team does not know what they are talking about. Be specific: give an example of how their approach can produce a softwar system that fails. 9

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!