Buggy: simulates a student who makes mistakes
This is the first approach to explains student errors.
Build gradle build
Run java -jar ./build/libs/buggy.jar
143 -28 ------- 125 |
When the student needs to borrow, he adds 10 to the top digit of the current column without subtracting 1 from the next column to the left. |
143 -24 ------- 121 |
The student substracts the smaller digit in each column from the larger digit regardless of which is on top. |
1.300 -522 ------- 878 |
When borrowing from a column whose top digit is 0, the student writes 9 but does not continue borrowing from the column to the left of the 0. |
140 -21 ------- 121 |
Whenever the top digit in a column is 0, the student writes the bottom digit in the answer. |