Question: In java, please make it easy to copy and paste. There is three classes, main.java, roster 1 . txt , roster 2 . txt Background

In java, please make it easy to copy and paste. There is three classes, main.java, roster1.txt, roster2.txt Background
A common real-world application of Binary Search Trees (BSTs) is in implementing database indexing. Databases store and manage large volumes of data, and efficient data retrieval is crucial for database performance. Indexes are used to speed up the retrieval process. The properties of BSTs allow for efficient searching and insertion operations.
Application
In this project you will implement a Student Records Database Application. Each Student Record will include the Student ID# (to be used as the index), Student Name, and current course grade. The user of the application will be able to import a roster of students from a file, then perform operations on the database such as registering new students, updating an existing student record, displaying the student with the highest grade, and displaying the student with the lowest grade. The database should be implemented as a Binary Search Tree, using the student ID as the index.
When run, your application should first prompt the user for the roster filename to import. This will be a text file that contains a list of student records, where each line contains one student record as an student ID number, followed by their first name, last name, and their grade in the course as a decimal percentage, and terminated with a newline. Here is an example:
12345 Ryan Meuth 78.4
If the filename provided by the user does not exist, the following error should be displayed, and the program should exit immediately:
*** Error: File Not Found. ***
Next, your program should display a menu of actions to perform, in this order, and ask the user for their choice as a number:
Register New Student
Display Existing Student Record
Update Existing Student Record
Display Student with Highest Grade
Display Student with Lowest Grade
Exit
When the user enters the number, the corresponding action should be completed, then the menu should be displayed. This process will repeat until the user selects exit, then the program should end.
Register New Student should prompt the user to enter the student ID, full name and current grade of the new student. A new student record should be created and added to the database.
Display Existing Student Record should prompt the user to enter the student ID, then search the database for the student record. If it is found, the student record should be displayed. Here is an example of the expected display format:
ID: 12345 Name: Ryan Meuth Grade: 78.4%
If the student ID is not found, the following error message should be displayed:
*** Error - Student ID Not Found! ***
Update Existing Student Record should prompt the user to enter the student ID, then search the database for the student record. If it is found, the student record should be displayed in the same format as above, and then the application should prompt the user to enter a new grade value for the student. The student record should then be updated in the database. If the student ID is not found, the error message above should be displayed.
Display Student with the Highest Grade should search the database for the student record with the highest grade. The display format should be the same as that described in the display existing student record action.
Display Student with the Lowest Grade should search the database for the student record with the lowest grade. The display format should be the same as that described in the display existing student record action.
Exit - End the program.
Two sample roster files are available for your testing:
roster1.txt
roster2.txt
Design Considerations
Binary Search Tree - In a previous assignment you implemented a Binary Search Tree data structure which you should also use to implement this application. You might also consider adding functionality to your existing Binary Search Tree implementation.
Object Oriented Design - use good object oriented design principles to implement this application. Consider using a design process like CRC cards or Noun-Verb analysis on the above project description to design your classes and behaviors.
Example Run
Enter Database Filename: roster1.txt
Select an action:
1. Register New Student
2. Display Existing Student Record
3. Update Existing Student Record
4. Display Student with Highest Grade
5. Display Student with Lowest Grade
6. Exit
Enter Choice #: 1
Enter student ID: 11011
Enter Student Name: Joey Josephson
Enter student grade: 65.0
Select an action:
1. Register New Student
2. Display Existing Student Record
3. Update Existing Student Record
4. Display Student with Highest Grade
5. Display Student with Lowest Grade
6. Exit
Enter Choice #: 2
Enter student ID: 11011
ID: 11011 Name: Joey Josephson Grade: 65.0%

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!