Objective-C "grade school" exercise has fallen behind the problem specification

There are far fewer tests in the exercise than are described in the problem specification, and an important one has been omitted. I ran into two problems, but there are probably more:

  1. The problem specification for the grade-school test says, “If a test attempts to add the same student more than once, your implementation should indicate that this is incorrect.” There’s no test to validate this and the solutions I checked do not meet this specification.

  2. The problem specification also says, “Grades should be sorted as 1, 2, 3, etc.” but the data structure used to store the grades is a dictionary, which is unordered, and the test does not and cannot check for the ordering of the grades.

Is the test program due for an upgrade? Also, it is unclear to me how the exercise should deal with multiple adds of the same student; the canonical data in the specification doesn’t seem to allow for raising an error condition, but any practical implementation would probably do so.

Yeah, the test site is stale, and the docs are more recently updated than the exercise test suite so that might be why you see these discrepancies. That was one of the exercises I skipped writing a test suite generator for last week, but I’ll take another look and see if we can get that test suite updated.

1 Like

See Fixed bob exercise's testForcefulQuestions test

If you’d like to write a template, I think that’s fine. Otherwise, this track is unmaintained so until someone comes along and offers to step forward as a maintainer, expect things to be stale. There’s no staff that keeps these tracks up to date.