Almost everything is done for this. Essentially im just changing the structure from a linked list to a binary search tree; Project #3   Write a program that can maintain a Roster of Students , using a...

Almost everything is done for this. Essentially im just changing the structure from a linked list to a binary search tree;


Project #3



Write a program that can maintain a Roster of
Students, using a
Binary Search Tree
to enter students originally, and then storing the students into a sorted array. with a maximum of 10 students in the roster. The program should be able to search for a given student, add a student, and drop a student. The roster should be saved as a text file.


You may use the Java BST, or you may write your own.  You will create a sorted array for the roster from the BST when the user selects “Save Changes”


Your array should have a max size of 10 for this part of the project, but should be partially filled to begin.  After the students have been stored in the sorted array, you should allow the user to add students (maintaining sorted order, but not allowing more than 10 students), drop students (with no “null” array entries) and search for students by ID and by name.  Your search should return the
Student, not a Boolean.


You should include a menu for the user, including:


Load roster from a file


Add student

Remove student

//Search student by ID comment this out for Project #3

Search student by name

“Save” change (this method will copy the BST to a sorted array)

“Save changes” (this method will save a sorted text file in a different file, so I can see the final roster)


You may use a text file to store the original students (to make it easier for you to test) and load that unsorted roster into the linked list.


You should be able to add/remove students using both the BST and the array,
but not both at the same time. Once the array is created, you do not need the BST. (Your final part of the semester project will include “documentation’ discussing the differences in using the BST versus the array for adding/removing.)


Please submit the project either by attaching the separate files, or “zipping”, but please do not send me “jar” – I have had some trouble opening those (I think it is my Kaspersky causing the problem, but I haven’t resolved it yet.)



May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here