Rubric — Assignment 2 (20 marks)

Applies to Assignment 2.

Task 1 — Trace and explain (5)

BandDescriptor
5All four correct with mechanisms ("length fails first", "index out of range", etc.).
3–4Three correct, or all four values right but two mechanisms hand-waved.
1–2Two correct.
0Guesses without mechanism.

(Reference: (a) "bad" — length 5; (b) "bad" — last character c is not a digit; (c) "bad" — first character 1 is not a letter, though length is 8; (d) "bad" — length 7.)

Task 2 — Test table from requirements (6)

BandDescriptor
5–6≥ 12 deliberate rows; every rule's pass and fail side covered; length boundaries (7, 8, 9) present; predictions marked with plausible mechanisms; rows visibly derived from the requirement.
3–412 rows but mostly pass-side or happy-path; predictions generic.
1–2Table written after running the code (rows mirror the code's behaviour); or fewer than 8 rows.
0No table.

Task 3 — Better contract (4)

BandDescriptor
4First-failure ordering correct; empty string handled explicitly (named verdict, not a crash); pseudocode translatable.
2–3Ordering correct but empty string undefined, or verdicts not per-rule.
0–1Ordering wrong or no contract stated.

Task 4 — Fix and prove (5)

BandDescriptor
5verdict correct; both full runs pasted; the comparison identifies the discriminating rows and articulates why a passing-only suite is weak evidence.
4All present but the comparison is shallow ("verdict is better").
2–3Implementation correct but runs incomplete or edited.
0–1Implementation fails its own table.

Cross-cutting adjustments