CS 2135 (A01) Homework 2: Lists

Due: January 24 (Thursday) at 11:59pm via turnin (assignment name hwk2).

Assignment Goals


The Assignment

You've been hired as a TA for a course, and want to automate your handling of student grades. The gradebook must store the following grades for each student: hwk1, hwk2, hwk3, project, midterm, final, and course (the final course grade is letter grade). The student info you received from the registrar consists of a first name, last name, advisor's (last) name, and id number for each student.

  1. Develop a data model and data definitions for your gradebook. Consider which information belongs in the same structures, and which belongs in different structures (for example, you may wish to later augment your student info to also reflect a student's class year). Design your model with such future changes in mind.

  2. Write the template for programs over gradebooks.

  3. Write a program missing-hwk1? that takes a gradebook and returns a boolean indicating whether any student in the gradebook has a score of 0 on hwk1.

  4. The registrar wishes to compile grade summaries for advisors. An advisor report contains a student's first and last names, course number (make one up) and the course grade. Write a program advisor-report that consumes a gradebook and an advisor's name and produces a list of advisor reports. The output list should contain exactly one advisor report for each student in the gradebook with the given advisor.

  5. Write a program compute-course-grades that takes a gradebook and a conversion function and returns a gradebook with course grades calculated for each student. The final grade calculation proceeds in two steps:

    1. First, compute a numeric grade based on the following formula: homeworks worth a total of 35%, the project worth 15% and the exams worth 25% each.
    2. Use the conversion function to convert the numeric grade to a letter grade. The conversion function should consume a number and return a letter grade (symbol).

  6. Show how to compute-course-grades to compute final grades according to two formulas:

  7. Write a program grade-count-with-conversion that takes a gradebook, a conversion function, and a letter grade and returns the number of students who would earn that grade if grades were computed using the given conversion function.


What to Turn In

Turn in a single file hwk2.ss (or hwk2.scm) containing all code and documentation for this assignment. Make sure that both students' names are in a comment at the top of the file.


Hints and Guidelines


Back to the Assignments page