Question: DISPLAY THE TASK MENU: FA 2 0 2 4 _ StudentWithGenericBSTandGenericAVLTree _ Smith.java MENU OF TASKS MENU JAMES SMITH - - - - - -
DISPLAY THE TASK MENU:
FAStudentWithGenericBSTandGenericAVLTreeSmith.java
MENU OF TASKS MENU JAMES SMITH
Display all students in the data structure
Insert one new student
Search student
Display the information of one student
Modify information of one student
Delete one student
Exit and Update Database
TASK DISPLAY ALL STUDENTS IN THE SELECTED TREE
Display all students in the selected tree by using the operation inorder of the tree
TASK INSERT ONE NEW STUDENT
Ask information of one student about student id last name, first name, phone, address then create the object of FAStudentyourLastName, insert it to selected tree by using the operation insert
Check result and display message: Insert successfully OR display message: Insert failed
Call the above method treeLevel to print output level of the tree after inserting a new node
TASK CHECK IF A STUDENT EXISTS SEARCH STUDENT
Ask users to enter student id that they want to search
Create the object of Student with the id then search it in the selected tree by operation search
If it is found, display the message Student is found
Otherwise, display the message Student is not found
TASK READ INFORMATION OF ONE STUDENT
Ask users to enter student id read fetch from the student from the data structure
If it exists display the information of student
STUDENT ID:
STUDENT NAME: Mary Lane
STUDENT PHONE:
STUDENT ADDRESS: Home street
Otherwise display message: Student cannot be found
TASK UPDATE ONE STUDENT INFORMATION
Ask users to enter student id access the method fetch to have the object temp
Create the object named update by using copy constructor from temp
Display the menu to allow users to select information to change:
FAStudentWithGenericBSTandGenericAVLTreeSmith.java
Update Information JAMES SMITH
Change last name and first name
Change phone
Change address
DONE.
When users select one information, display message to ask new information and use the object update to access mutator method of that field to change.
When users select for DONE then delete the object temp and insert the object update
If both delete and insert are success then display the message: Update student successfully otherwise display the message: Update failed
TASK DELETE ONE STUDENT
Ask users to enter student id create the student object with student id then delete the object from the tree by access the operation delete
If delete success display the message: Delete Student successfully; otherwise, display message: Delete student gets failed
Call the above method treeLevel to print output level of the tree after inserting a new node
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
