Previously this code was applying the required operations to every
second digit starting from the LEFT. The correct solution applies the
required operations to every second digit starting from the RIGHT. The
fact that this was not caught by the tests is a problem! The canonical
tests have been updated since this exercise was last overhauled, so next
steps should be to update to match the expanded canonical test suite,
then test against a broken implementation to see if it is now caught.
Even if it is, it may be worth including an explicit left vs right test
in the canonical suite if one does not already exist.
* Issue #253: Tried to improve grade school structure. Removed .db() function, added numberOfStudents functions and renamed the sort function to studentsByGradeAlphabetical. Added test to check that grade() gets the students in the order they were inserted. Removed getsStudentsInAGrade() test as what it was testing was already being covered by the tests before it.
* Added tests for protection agains mutation of the list object
* Issue #253: Make the sort test more generic. This to allow a broader range of implementations. Currently users are hindered into return the type HashMap<Integer, List<String>. This test update will check the order of any Map that maps to any Collection value type. This opens the doors for more possible types of solutions.
Issue #253: Tried to improve grade school structure. (#259)
* Issue #253: Tried to improve grade school structure. Removed .db() function, added numberOfStudents functions and renamed the sort function to studentsByGradeAlphabetical. Added test to check that grade() gets the students in the order they were inserted. Removed getsStudentsInAGrade() test as what it was testing was already being covered by the tests before it.
* Added tests for protection agains mutation of the list object
Issue #253: Make the sort test more generic. This to allow a broader range of implementations. Currently users are hindered into return the type HashMap<Integer, List<String>. This test update will check the order of any Map that maps to any Collection value type. This opens the doors for more possible types of solutions. (#269)
Review markups. Changed assertion order, test names and position of Ignore in MatrixExercise. Changed Integer.valueOf to Integer.parseInt in Matrix. Changed String.split to using Pattern in Matrix.