CS 1102 (A16): Lab 5

To get your participation credit, make sure you
upload your Definitions file to turnin before you leave the lab!
(This work will not be graded---full credit just for submitting.)


Lab Motivation and Goals

This lab is designed to have you write an interpreter for a portion of the tutoring system language from Homework 4.

You need to use Advanced Student language level for this lab!


Exercises

Put your name in a comment at the top of the Definitions area.

The starter file provides a data definition and examples of data for a portion of the tutoring system you worked with in Homework 4. (NB: Save the file on your Desktop and then open it in DrRacket!)

Write an interpreter for this language that prompts the user with questions, records the answers, and reports scores as indicated in the exam examples. You will need to use Racket I/O commands for this, such as printf (for output) and read (for input). Summaries of these are available here.

The interpreter should produce an interaction similar to the ones in the sample exams from Homework 4 (minus the parts of the language that have been omitted, such as random messages, hints, and question categories).

Figuring out how to store the given answers and results is part of your task here. You may modify the original data definitions if you want, or use a separate data structure to hold the results. You might also pass a list of results so far as an extra argument to your function that processes a list of commands.

Everyone should be able to get here.

Once that's working ...

Extend the language and interpreter in some of the following ways (add whichever ones you find most interesting, in whatever order you choose):

  1. Categories of questions, with status reports per category

  2. Multiple-choice questions

  3. Questions with hints