Question
Programing with java BINARY SEARCH TREE DATA STRUCTURE OBJECTIVES -Students know how to implement the Binary Search Tree structure: How to insert a node to
Programing with java
BINARY SEARCH TREE DATA STRUCTURE OBJECTIVES
-Students know how to implement the Binary Search Tree structure: How to insert a node to a tree, How to fetch, delete or update a node on the Binary Search tree. -Also, students know how to display the information of all nodes on the tree
REQUIREMENT Create an application that allows users can work on the information of students with the following tasks:
1. Insert
Allow users to enter the information of a candidate or a candidate with experience from the keyboard -Create the object then insert to the data structure
2. Fetch
-Allow users to type a candidate id then search in the date structure for looking for the candidate or the candidate with experience. If it is found, print out the information on the screen otherwise display the message: The candidate cannot be found
3. Encapsulation
-Allow users to type a candidate id from the keyboard. Search in the date structure. If the candidate (or candidate with experience) is found, ask for new phone number from the keyboard and change the phone of the candidate (or candidate with experience). -Fetch the candidate (or candidate with experience) with the same provided id. Then compare the phone of the candidate (or candidate with experience) just fetched with the new phone. If both the phone numbers are the same then display the message Binary Search Tree structure is not encapsulated otherwise display the message Binary Search Tree structure is encapsulated =[
4. Update
Display the message to ask users to enter the candidate id. Using the candidate id to read the node out the data structure as a candidate (or a candidate with experience). Asking for the new degree from the keyboard and change the degree of the candidate (or the candidate with experience) with the new degree to have a new node. Update the data structure with the new node with the same candidate id. Display the message to see if update successfully or not
5. Delete
Display the message to ask users to enter the candidate id. Remove the node with the entered id Display the message to see if delete successfully or not
6. Show all
Display all the candidate (or candidate with experience) are currently stored in the data structure
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started