Try   HackMD

Lab 11: Data Recommendations

We recommend using a course dataclass to represent individual courses and a student dataclass to represent individual students (details for exactly what these contain are in the next part of the lab handout).

In the Course dataclass, the most critical attribute is the list of Students registered for the courses, as the registration system needs to know the students that are registered for each course.

In the Student dataclass, we need a list of registered courses, because the registrar would then be able to efficiently find a student's courses. We also need an ID for the registrar to access the information of individual students (names might not be unique!).

In order to efficiently access a student by their ID, or a course by its code, we recommend storing the Student and Course dataclasses in two separate dictionaries (aka hashtables) with ID's or codes as their key and Student or Course dataclasses as their values. This will let the registrar easily access information about a given student or course from their ID or code.