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, midterm, final, and course (the final course grade). The student info you received from the registrar consists of a first name, last name, class year, 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 advisor). Design your model with such future changes in mind.
Write the template for programs over gradebooks.
Write a program add-student that takes a gradebook and the new student's first name, last name, class year, and id number and returns a gradebook containing the new student and all of the students in the original gradebook. The new student should have 0s on all assignments and exams and the final course grade.
Write a program remove-student that takes a gradebook and a student's last name and id number and returns a gradebook containing all students except the one with the given name and id.
Write a program compute-course-grades that takes a gradebook and returns a gradebook with course grades calculated for each student. The course grades are computed according to the formula of homeworks being worth 10\% each and exams being worth 35\% each.
Write a program sort-by-dec-grades that takes a gradebook and returns a gradebook sorted in decreasing order by students' course grades.
Write your own sorting function for this problem. Do not use one of the sorting functions built-in to DrScheme.
Write a program sort-by-inc-midterm that takes a gradebook and returns a list of midterm scores sorted in increasing order.
This program should use the same sorting function as the previous problem.
Write a program final-average that consumes a gradebook and returns the average grade on the final exam.
The registrar requires faculty to submit grade reports showing the final grades for students. A grade-report contains a student's last name and id number, the course number (make one up), and the final grade (A, B, C, F). Write a program to produce a list of grade-reports from a gradebook (the conversion from numeric course grades to letters is as follows: A=87-100; B=73-86; C=60-72; F=below 60).
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.
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).