Question: Use python 3 Problem: The purpose of this exercise is to write a sorting function that sorts a list of objects. First, implement a Student

Use python 3

Problem:

The purpose of this exercise is to write a sorting function that sorts a list of objects. First, implement a Student class that has three attributes: ID, name, and mark. Then, implement a sorting function that sorts a list of Student objects based on one of the above attributes at a time, to ascending order. For example, the sorting function that you will implement can be called to sort a list of Student objects based on either of the students ID, name, or mark in the course. This requires you to implement a comparison function as part of the Student class in order to be able to compare every two Student objects based on each of the above attributes. You may use this sample input file to test your implementation. Your program should be able to read and parse sample input, and store the data into a list of Student objects. sample input file:

1292467, George Daniel, 89 1398976, Amir Jahani, 76 1392567, Sarah Kylo, 90 1368989, Breanne Lipton, 82 1409916, Robert George, 95 1267756, Jeff Anderson, 84 1367814, Xialing Liu, 86 1458879, Ali Gendi, 77 1407756, Mary Simon, 35 1428867, Georgina Moore, 88 1491228, Brian Johnson, 42 1398875, Samuel Picard, 55 

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!