Documentation with Comments FRQ Practice

Responses receive AI feedback against a rubric after submission. Scores are practice estimates.

Question 1 of 5

A studio program needs documentation for future potters.

(a) Write a // comment that states the next statement dries a piece. (b) Write a /* */ comment that could cover two sentences of workshop notes. (c) Write a /** */ comment that could sit above a method and explain that it returns remaining kiln hours.

Question 2 of 5

Start from:

int bisque = 7;
bisque -= 2;
bisque *= 3;
System.out.print(bisque);

(a) Show how to comment out both updates with one block comment so the program displays 7. (b) Show an alternative that comments out only bisque *= 3; using //. (c) State the displayed value in that alternative.

Question 3 of 5

Explain the difference between comments and executed code using this fragment:

int slip = 4; // increase later
slip += 1;
System.out.print(slip);

(a) State the displayed value. (b) Explain whether increase later runs as an assignment. (c) Explain who comments are written for.

Question 4 of 5

A student is unsure why Javadoc looks similar to a block comment.

(a) Contrast /* */ with /** */. (b) Give one reason to write Javadoc on a public method. (c) Explain whether Javadoc runs when the method is called.

Question 5 of 5

During debugging, a potter comments out a line, then forgets that string text is not a comment.

int temp = 12;
// temp -= 5;
System.out.print("temp -= 5;");

(a) State the value of temp. (b) State the displayed text. (c) Explain how commenting-out helped testing and why the printed text did not change temp.