Programming Assignment 2 Student Management System
Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit
Programming Assignment 2
Student Management System
Problem Description:
In Emperor Penguin University (EPU), every student record contains the following information:
• First Name
• Surname
• Gender
• ID
• Age
Among them, the ID is a unique identifier of the student. The complete student list is stored in “studentList.txt”. Please build a student management system for EPU which:
• Stores all the student records on an AVL tree.
1. There are in total 31537 records
2. Please define proper struct to describe a student record
• Accepts query commands and prints a message for a certain student.
1. The command for a query is of format: “q”+
2. Follows describes the format of the message.
a) If the user inputs “q29001”, the system should print “Olivia SWANSON (29001) is afemale of age 20.”
b) If the user inputs “q26870”, the system should print “Zyn STARK (26870) is a male of age 21.”
c) If the user inputs “q40000”, the system should print “ No records found.”
• Acceptsunenrollment command and removes a certain student from the tree.
1. The command for unenrollment is “ u” +
“ u29001”, the system should remove the student record whose ID is 29001.
2. A message is printed after unenrollment.
a) If the user inputs “ u29001”, the system should print “Olivia SWANSON (29001) is unenrolled.”
b) If the user inputs “ u40000”, the system should print “ No records found.” 3. You don’t have to write the information back into “studentList.txt”.
• Accepts the exit command and exits the program. The exit command is “e”.
You need to submit five files on iSpace:
Student.java: the class for a student record.
Node.java: the class for an AVL tree node which stores one Student object.
BST.java: the class for a BST where every node is a Node object. It is the superclass of AVLTree.
AVLTree.java: the class for an AVL tree where every node is a Node object. It is a subclass of BST.
SMS.java: the class for the “student management system” which stores the student records using an AVL tree. It contains a main function which runs the main procedure.
Note:
. Make sure your code is written in Java.
. Make sure that an AVL tree is used for SMS, and every node of the tree stores one student record.
. You may assume that the .txt file is in the same directory as your program does.
. You may assume that the user command is always valid.
2023-12-19