Repository with assignments using the Test Informed Learning with Examples (TILE) method to integrate testing into existing programming courses for free.
Join our LinkedIN Community.
Use the following BibTeX entry to cite this work:
@INPROCEEDINGS{DVMB2023, author={Doorn, Niels and Vos, Tanja and MarĂn, Beatriz and Barendsen, Erik}, booktitle={2023 IEEE Conference on Software Testing, Verification and Validation (ICST)}, title={Set the right example when teaching programming: Test Informed Learning with Examples (TILE)}, year={2023}, volume={}, number={}, pages={269-280}, doi={10.1109/ICST57152.2023.00033} }
Write a program that receives an integer \(N\) and generates all the multiples of 7 between 1 and \(N\). Run the following test cases to test your program:
test case ID | inputs | expected outputs |
---|---|---|
1 | 0 | there are no multiples of 7 |
2 | 3 | there are no multiples of 7 |
3 | -5 | there are no multiples of 7 |
4 | -15 | -7, -14 |
5 | 18 | 7, 14 |
6 | 57 | 7, 14, 21, 28, 35, 42, 49, 56 |
Insist that the students test their programs by giving them example
test cases in a table. Again the chosen values will make them aware
that there program should also work for negative numbers.