Test Informed Learning with Examples

Logo

Repository with assignments using the Test Informed Learning with Examples (TILE) method to integrate testing into existing programming courses for free.

Menu

LinkedIN Community

Join our LinkedIN Community.

Calculate the maximum of real numbers

Implement a program that reads 12 real numbers and calculates the maximum. Run the following test cases to test your program:

test case ID inputs expected outputs
1 12.2, 6.0, 3.3, 4, 5, 6.5, 7, 8, 9, 3.3, 11, 12.2 12.2
2 -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12 -1
3 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 0
4 12.4, 21.005, -3.67, 4.43, 5.56, 4.2, 7, 8.3, -91.3, -1.0, 32.4, 12.1 32.4
Insist that the students test their programs by giving them example
test cases in a table.