Tag Archives: poorly

Given: (Exhibit) This class is poorly encapsulated. You need to change the circle class to compute and

Given:This class is poorly encapsulated. You need to change the circle class to compute and return the area instead.What three modifications are necessary to ensure that the class is being properly encapsulated? A. Change the access modifier of the setradius () method to private B. Change the getArea () method public double getArea () { return area; }… Read More »

Given: (Exhibit) The class is poorly encapsulated. You need to change the circle class to compute and

Given:The class is poorly encapsulated. You need to change the circle class to compute and return the area instead.Which two modifications are necessary to ensure that the class is being properly encapsulated? A. Add the following method:public double getArea ( ) {area = Match.PI * radius * radius; } B. Change the getArea( ) method as follows:public double… Read More »