CS 1102 (A12) Homework 4: Data Definitions for Languages

Due: September 20 (Thursday) at 11:59pm via turnin (assignment name hwk4).

Assignment Goal

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.


Problem Set-Up

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:

Since the system can skip questions, two students taking the same exam might see a different series of questions.

For example, the language must be able to capture the exams (and intended interactions) shown on the sample exam page.

The Assignment

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.


Hints and Guidelines


What to Turn In

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.


Back to the Assignments page