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.
Implement a program that reads three values and displays on the screen the maximum and the minimum. Run the following examples to test that your program gives the same outputs:
>>> %Run
Enter the first value: 3
Enter the second value: 6
Enter the third value: 8
The maximum is 8 and the minimum is 3
>>> %Run
Enter the first value: -4
Enter the second value: 6
Enter the third value: 12
The maximum is 6 and the minimum is -4
>>> %Run
Enter the first value: 4.567
Enter the second value: 9
Enter the third value: 12.9
The maximum is 9 and the minimum is 12.9
>>> %Run
Enter the first value: a
Enter the second value: c
Enter the third value: h
The maximum is h and the minimum is a
>>> %Run
Enter the first value: hello
Enter the second value: hola
Enter the third value: bonjour
The maximum is hola and the minimum is bonjour
>>> %Run
Enter the first value: 4
Enter the second value: oh!
Enter the third value: 4.89
The maximum is oh! and the minimum is 4
Insist that the students test their programs by giving them example
test executions. The values used in the example test executions will
make then aware that the program was not only for numerical values
but for any value.