Assignment No 2
Assignment No 2
Instructions
Please read the following instructions carefully before submitting the assignment solution:
It should be clear that your assignment will not get any credit/marks if:
o Assignment is submitted after due date.
o Submitted assignment does not open or file is corrupt.
o Assignment is copied (From internet/students).
Recommended Tools
Dev C++
Assignment Submission Instructions
You have to submit only “.cpp” file of your code on the assignments interface from your LMS
account.
Assignment submitted in any other format will not be accepted and will be scaled with
zero marks. No excuse will be accepted on submitting solution file in any other format.
For any query related to assignment, please contact [email protected].
Problem Statement:
The University conducts semester-end examinations for students. To maintain order and manage
the student entries, the University allocates seats alphabetically by student names. You are
required to construct program using binary search tree that will perform following functions.
The program can automatically organize student names in alphabetical order.
Sometimes, a student may choose to withdraw from an examination. The program can
remove a student's name from the seating arrangement. The program will ensure that the
alphabetical order of the remaining names is maintained.
To verify the seating arrangements and to help students to their respective seats, the staff
can display the current alphabetical list of student names (using in-order traversal).
To implement this use case, you'll need to use C++ to build a binary search tree data structure
that can efficiently build BST, as well as sort them according to alphabetical order.
Important Instructions:
You need to fulfill the following requirement while solving the assignment task.
1. For the construction of BST use only class, the use of struct will be considered an
invalid solution.
Hint: The structure of classes which you need to create in the required program is given below.
Student TreeNode
+name:string +student:student
+ left: TreeNode
+Student() + right :TreeNode
Sample Output:
Lectures Covered: 31
Due Date: 8th January, 2024