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.

Cite this work

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}
}

Fruit classification using Artificial Intelligence

An expert system is a type of artificial intelligence program that uses a knowledge base and a set of rules to perform a task that a human expert could do. They help self-diagnose a problem by answering a series of questions. For example, many hardware and software companies offer online troubleshooting tools to help people solve simple technical problems before calling a human.

Create a program that guides the user through the process of figuring out the type of fruit on hand. Use the following decision tree to build the system:

image

>>> %Run 
    Color (green/yellow/red): green
    Size (big/medium/small): big
    Watermelon
>>> %Run 
    Color (green/yellow/red): yellow
    Shape (round/thin): round
    Size (big/small): big
    Grapefruit

To test your program very well you should have a test case for each of the 9 fruits on the tree.

Insist that the students test their programs by giving them example
test executions and ask them to add more tests such that each
possible inputs occurs once.