Kizspy.me
Class Student: contains information about a Student object, including id, name, and fee.
Class SIINode: includes a Student object and a next pointer for linking.
Class BstNode: includes a Student object and left, right pointers for linking.
Class Course Registration: is the main class of the progran., containing:
1) Class SIIStudent: is a Linked List, used to store data and maintain the insertion order
of students as they are added, and
2) Class BstStudent: is a Binary Search Tree (BST), allowing retrieval of students in sorted
order (in-order traversal) and ensures that the list of students' course registrations can
be searched efficiently.
Students are required to carefully read the provided code segments to fully understand the
relationships between the classes and the functions within each class. The specific task of the test
is to execute the following requirements:
1
a. f1(): To complete requirement f1(), the student needs to implement two methods
addStudent(...) and printinsertionOrder(...) in the SIIStudent class to add students to the
Linked List and print out the first 5 students who have paid fees (assume this condition is
satisfied).
Expected result:
(9,V,true) (15,M,true) (12,N,true) (7,A,true) (3,T,true)
b. f2(): To complete requirement f2(), the student needs to implement two methods insert(...)
and insertStudent(...) in the BstStudent class: insert a new node with key = id to the Binary
TINTI L
Zoom
+ 100%
Close