Assignment 2
Assignment 2
Assignment # 02
1.1 Guidelines
1. Any plagiarism in assignment will lead to zero marks.
2. CHAT-GPT and Generative AI
a. Do not use ChatGPT to generate entire pieces of academic writing but only for
generating ideas, etc.
b. Clearly identify which parts of your writing were generated with the help of
ChatGPT.
c. Use ChatGPT only as a starting point. Use your critical thinking and analysis for
evaluation.
d. Always cite any sources that you use. This is important for avoiding plagiarism and
giving credit where credit is due.
e. Be aware of the potential for bias in the information generated by ChatGPT. Always
critically evaluate the information and be cautious of potential biases or
inaccuracies.
1.2 Due Date and Time: 27th November 2023 (End of Day) – Submit via MS Teams
You are tasked with managing a circular linked list that stores information about students. Each node
in the circular linked list represents a student and contains the following information:
Student registra on ID
Name
SGPA
CGPA
1. Insertion: Implement a function to insert a new student into the circular linked list while
maintaining the order based on their GPA in descending order. The circular linked list should
be initially empty.
2. Deletion: Implement a function to delete a student from the circular linked list based on
their Student ID.
3. Search: Implement a function to search for a student in the circular linked list based on their
Student ID.
4. Display: Implement a function to display the information of all students in the circular linked
list.
5. Sorting: Implement a sorting algorithm (e.g., Selection Sort, Insertion Sort) to sort the
circular linked list based on SGPA and CGPA in descending order based on the user input.
6. Searching: Implement a searching algorithm (e.g., Binary Search) to search for a student
based on their GPA.
7. Update SGPA or CGPA: Implement a function to update the SGPA or CGPA based on the
user input of a student based on their Student ID.
8. Statistics: Implement a function to calculate and display the average GPA of all students in
the circular linked list.
Guidelines:
Use appropriate data structures and algorithms to efficiently implement the func onali es.
Ensure that the circular linked list remains circular a er each opera on.
Test your implementa on with various scenarios to ensure correctness.
Provide a user-friendly interface for interac ng with the circular linked list.
Implement error handling mechanisms to handle cases such as an a empt to delete a non-
existent student, searching for a non-existent student, etc.
Implement addi onal sor ng and searching algorithms and compare their performance on
large datasets.
Submission:
Submit the C++ code in handwritten scanned version along with the explanation of your approach,
the choice of algorithms, and any challenges you faced during the implementation.
This assignment is designed to test your understanding of circular linked lists, sorting algorithms, and
searching algorithms. Feel free to adapt the assignment based on your preferences and
requirements.