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.
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.
Write the template for programs over gradebooks.
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.
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.
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:
Show how to compute-course-grades to compute final
grades according to two formulas:
A=87-100; B=71-86; C=55-70; F=below 55.
A=89-100; B=75-88; C=62-74; F=below 62.
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.
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.
Refer to the Laws of Homework when preparing your solutions.
Aim for reuse where possible! If a program you write for one part is useful for another part, reuse it. Similarly, your general routines like sort should be flexible enough for you to use on multiple problems.
Use map and filter whenever appropriate in your solutions. Solutions that match the structure of map and filter but don't use them will lose some points.
Follow the templates! We teach them to you because they help you organize your programs. Programs that don't follow the templates will lose points, so follow the templates (programs that use map and filter are obviously excepted from this rule).