0% found this document useful (0 votes)
32 views

Assignment No 2

The document provides instructions for an assignment to build a binary search tree data structure to organize student exam seating alphabetically. Students can be added or removed from the tree. The program must maintain alphabetical order and allow displaying the seating list in order.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views

Assignment No 2

The document provides instructions for an assignment to build a binary search tree data structure to organize student exam seating alphabetically. Students can be added or removed from the tree. The program must maintain alphabetical order and allow displaying the seating list in order.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Assignment No.

02 (Graded) Total Marks: 20


SEMESTER Fall 2023 Due Date: 8th January, 2024
CS301 P - Data Structures (Practical)

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

+insert (TreeNode* root,


Student* student)
+ remove (TreeNode*
root, string name)
+inorder (TreeNode*
root)
+incrementFrequency()
Non Member
Functions
Main ()

Structure of classes need to be created for required program.

Sample Output:
Lectures Covered: 31
Due Date: 8th January, 2024

You might also like