Skip to main content
๐Ÿ“œ WAYPOINT LESSON

Answer conventions

โญโญ intermediateโณ 12 min read๐Ÿ“ Lesson 135 of 256

Return shapes, identifier fidelity, private discipline, code-not-prose.

Answer-shape conventions that earn (or bleed) points:

Return exactly what the type demands. int return โ†’ return an int expression; no printing, ever, unless the prompt says "print". A printing solution in a return-typed part usually scores 0 for that part.

Match the identifier case. getTotal, not gettotal โ€” graders are human and rubrics cite names; near-miss identifiers read as wrong methods.

Respect the private fields. FRQ class parts say "you may add private helpers/fields" or forbid extra state. When the spec table names fields, use exactly those โ€” inventing parallel state (Module 9's ShoppingCart memory field) is only correct when explicitly permitted.

The access discipline. Public methods per spec; private helpers freely; never make fields public in an answer.

Write code, not prose. A part asking to "implement" wants Java. Partial code with a comment like "// loop here" earns partial credit if the visible parts are correct โ€” a paragraph of English earns nothing. If you cannot finish, finish the signature, the guard, and the loop skeleton: graded behaviors often live in the skeleton.

Example-decoding drill: given "returns the number of positions where the two arrays differ, treating missing tail positions as differing", the example differ({1,2,3}, {1,5}) == 2 proves BOTH the length-min mismatch counting AND the tail rule in one line. FRQ examples are dense; read them as test cases, not decoration.