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 11 This is a continuat

ID: 3708824 • Letter: P

Question

please use the line numbers in the images below:

Question 11

This is a continuation of the proceeding question. Is the method printCircleInParamenter invoked on an object? If yes, there will be an implicit parameter this and it refers to the current object that the method is invoked on.   Again the question: Is the method printCircleInParamenter invoked on an object? Please type yes or no in the blank below.

_________

If we change c.radius to just radius (which is an abbreviation for this.radius), what type of error will be incurred? Please type compile error, run-time error, or logic error in the blank below. You can try that in Dr.Java

___________

After the method invocation returns, what happens to the frame where all local variables are located? Please type either deallocated or kept in memoryin the blank below.

____________

After the method invocation returns, which line does the program return to in Circle2Test,java? Please type the line number 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

(A) No

The method is static , so the method is called by the class as a class has only one copy of the static method.

(B) compile time error

In a static method, we can only access the static attributes.

(C) deallocated

After this method is completed, the scope of any object or method is finished. Hence, the memory is deallocated by the automatic garbage collection feature of Java.

(D) 9

It returns to line 9.