Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

please use the line numbers in the images below: Question 6 After program return

ID: 3708808 • Letter: P

Question

please use the line numbers in the images below:

Question 6

After program returns to line 5 in the main method, it then proceeds to line 6. Line 6 is also a method invocation to setRadius.

What value is assigned to the explicit parameter newRadius this time?

_____________

Is radius on line 13 a local variable or an instance variable (an attribute of an object)? (Please type either local or instance in the blank below).

____________

1 public class Circle2Test 2public static void main (String[ args) I Circle2 first - new Circle2 (5) Circle2 second - new Circle2 (10) first.setRadius (20) second.setRadius (100) first.printCircle Circle2.printCircleInParameter (second); 10

Explanation / Answer


What values assigned :

After line 5. radius of first object is 20 and After line 6 radius of second object is 100



Line 13 is instance variable

Explanation : As radius is part of class variable hence its the same