To make sure you can develop the data definitions for a application-specific programming language.
Remember to follow the Expectations on Homework when preparing your solutions, including the academic honesty policy.
Note that for this assignment, only the data definitions section of the grading guidelines is relevant. Your work will otherwise be graded based on how well you have followed the data design and documentation approach we have used in class for designing the slideshow language.
Imagine that you are designing a software system that will administer teacher-designed exams to students. The teacher will define an exam in a language provided by the software system. The system will then "run" the teacher's exam. Running an exam means that, for each exam question, the system presents the question, reads the student's answer and then optionally displays diagnostic information provided by the teacher based on the student's answer.
The language for writing exams must allow a teacher to specify:
For example, the language must be able to capture the exams (and intended interactions) shown on the sample exam page.
Develop the data definitions for a language for representing electronic exams. You must submit both
The Racket expressions above must evaluate in DrRacket without error, creating the appropriate data structures. However, you do not need to be able to actually "give" (run) exams at the end of this assignment.
In other words, you do not need to implement the interpreter. You only need to write the data definitions and examples of data for the sample exams. Your solution will be a page or two at most and should not contain any functions (or templates). If this instruction leaves you confused, come to office hours.
Not sure how to start? Look back at the notes from the "Introduction to Languages" lecture: it discusses how a language consists of data, operations on the data, and control commands for ordering operations. What are each of these for an exam program? Imagine that the teacher were verbally giving commands to the exam software explaining how to give the exam. The commands (verbs) that you imagine the teacher issuing are the commands/operators in your language; the nouns are the data.
Once you've identified the operations and data, see how to organize them. If some data are similar in spirit but different in details, make a multi-case data definition (like we did for animals in the first week of the course).
Grade your own homework according to General Grading Guidelines before you hand it in! (Note that you do not need to write templates for this assignment.)
Turn in a single file hwk4.rkt containing all code and documentation for this assignment. Make sure that both students' names are in a comment at the top of the file.