Question: - Complete the class_init function. This function initializes a class with the given name and an empty list of students. It should set the class


- Complete the class_init function. This function initializes a class with the given name and an empty list of students. It should set the class name to the given String and the list of students to a new empty Vec. Take a look at student_init for an example of how to initialize a struct. - Complete the class_info function. This function returns information about the given class. It returns the name of the class and the number of students enrolled in the class. Take a look at student_info for an example of how to access and return information about a struct. - Complete the function. This function adds the given student to the given classes list of students. It should then return the attendance for the class. - Complete the function. This function returns some vector of the given students and whether they are enrolled in the given class. The return vec should be the same length as the given Vec of students. If the student is enrolled in the class, the value at the given index should be true, else it should be false. If there are no students enrolled, then you should return None. Be sure to check attendance using a students netid because there can be duplicate names
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
