Question: Sorting and Searching Objects This assignment involves implementing the sorting and searching algorithms we looked at in class. Instead of sorting and searching a list

 Sorting and Searching Objects This assignment involves implementing the sorting and

searching algorithms we looked at in class. Instead of sorting and searching

Sorting and Searching Objects This assignment involves implementing the sorting and searching algorithms we looked at in class. Instead of sorting and searching a list of integers or strings, in this case we are going to be sorting a list of Student objects by name or by the number of courses they are registered in. You are being provided with a StudentClass.py file which will be imported into your program. This module must remain unchanged. You are also being provided with an assignment5.py file which will act as your starting point to this assignment. This file contains a few functions you must implement as well as some test code at the bottom of the file which is currently commented out. You can use this commented out code to test the functions you have to write. These functions include: load students (filename) This function will open "filename", which is a csv file containing student information (name,id) on each line. This function will create a new student object for every entry in the file, add it to a list and then return the list of students. You are NOT to use a CSV module to do this. write students tofile(studentlist, filename) This function will open the file "filename" and output a record into this file for every student object in student list. These records will have the same format as the sample student input data provided (firstname,lastname,id,list,of,courses on each line). sort students by last name(student list) In this function you will implement the selection sort algorithm that was presented in class. This algorithm will sort the student list based on their last name (in alphabetical order) and will return this sorted list. search student by_last_name(student list, target_Iname) In this function you will implement the binary search algorithm. This will search the list of

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!