A small college needs a database to keep track of its students. Each student is represented by a student record which contains the following information:
The first and last names are strings, the student ID number is a 5 digit number, the major is a string, and the GPA is a real number. You may assume that no two students have the same first and last names, and that each student has a unique student ID number. The database will keep track of students by either the first name + last name pair, or the student ID number. A user should be able to retrieve a student record by giving the first name + last name, or by giving the student ID number. A user may find (and print out) a student record, add a new student record, change the major or GPA of a student record, delete a student record, and list all of the student records in order by (last name, first name) or by the student ID number.
Your program should have a class StudentDB which implements the following methods:
In addition to implementing these operations, your program should include a main method that tests all of them in a reasonable fashion. The program should not read command from the user.
The program must implement and use in a meaningful way the Simple Database ADT. The implementation must be efficient, i.e., you should use a binary search tree for this assignment. You may use any code for the book, the notes, or from class, as long as you properly credit the code. You may not use an API for the binary search tree for this assignment.
If you have questions or comments, email me at simon@mathcs.duq.edu