Learning objectives

Write a Javadoc-style comment for a given method that states one precondition, one postcondition, each parameter and the return value, in at most 8 lines.

Test a written comment against the code using at least 3 calls, including one boundary value, and decide whether the comment is accurate.

Decide, for a given call, whether the caller or the method is responsible when a documented precondition is broken.

Continue with a revision plan

These learning objectives are available to everyone. Sign in with an eligible plan to read the full note and worked examples.