Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help with writing this in Java PART2: BINARY SEARCH TREE DATA STRUCTURE OBJECTIVES -Students know how to implement the Binary Search Tree structure:

I need help with writing this in Java

PART2: 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 one new student

2. search the information of one student

3. delete one student

4. update the address of a student

5. show all students in the structure

6. exit the program

The users can continue using the program until they want to exit During the process, the application should use Binary Search Tree as the data structure

When the tree is empty, you need to display the message to tell: There is no student on the Binary Search Tree data structure

To search a student, if the student does not exist in the data structure, display the message The student cannot be found; else display the information of the student

Lab7

If delete a student successfully, display the message: Remove the student successfully

If update the information of a student, display the message: Update sucessfully

The information of a student that is stored in the database includes Student Id, last name, first name, address, phone number.

The information of one student is displayed in the following format:

Student name: Smith, James

Student ID: 1234567

Address: 123 Abrams Road Dallas, TX 75243

Phone: 4691234567

ANALYZE AND DESIGN

-Provide the UML of the data type class relating to the student information

-Provide the pseudo-code or the flowchart of main()

WHAT YOU SHOULD KNOW TO DO THE LAB

-Review the loop to manage the menu to re-display after each task to allow users to continue using the program until users want to exit

-The switch statement to handle all tasks after users select one

-Review how to write the constructors, method toString to display information of one object -Learn about the Data structure Binary Search tree: initialize, findNode, insert, fetch, delete, update, show all the nodes -How to create an object of the data type class -How to access data members of the data type class

HOW TO DO THE LAB

-Create the project named SP2017LAB7_PART2_YourLastname

-Add data type class name SP2017LAB7_Student_yourLastName then declare all data members and provide constructors, toString

-Add data structure class of BinarySearchTree_yourLastName (using the code from the book on page 394 - 396 for your reference). Note that the code from the book missing delete the root, you should add the code to delete the root in 3 cases

-Add driver class named as SP2017LAB7_StudentInformation_yourLastName then forllow the pseudocode to write the code

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database System

Authors: Elmasri Ramez And Navathe Shamkant

7th Edition

978-9332582705

More Books

Students also viewed these Databases questions

Question

Describe a typical interpersonal skills training program

Answered: 1 week ago