Suppose you are given a list of students registered in a course and you are required to implement an Linked List of student. Each student in the list has name, regNo and cGpa. You task is to implement following function related to Linked List.
insertStudent() : This function, when called will prompt user to enter his/her choice of insertion. The options are
1. Insert student at the start of linked list
2. Insert student at the end of linked list
3. Insert student before the student who name is entered
e.g if insertStudent(Student s, “Abrar”) is called, it will search student in the linked list with a name Abrar and then insert Student s (1st argument) before Abrar.
sortBycGpa( ) : When called, this function will sort all the students in the list based on CGPA.
display( ) : This function when called displays all the data of only those students whos cGPA are greater than the entered cgpa.
e.g. if display(3.5) is called, it will display all the students whos’ CGPA is greater than 3.5.
Answer to : Question 140263