Answered You can hire a professional tutor to get the answer.

QUESTION

Objectives 1. Warm up your Java programming skills. Understand the structure, operation and application of a binary search tree.

Objectives 1. Warm up your Java programming skills. 2. Understand the structure, operation and application of a binary search tree. Overview Develop an interactive software that builds a binary search tree, perform standard operations on the tree and its nodes. Project Description The software can build a binary search tree from a series of number input by users. It can perform retrieval, insertion and deletions of entries, standard traversals and data processing. Functional Requirements A user can, by using a command prompt to do the following: 1. Build a binary search tree by giving a series of number. 2. After the BST is built, the user can see following traversal printed to the output file, and displayed on the screen: a. Preorder. b. Inorder. c. Postorder. 3. Insert an entry to the binary search tree.. After the operation, the user can see the new binary search tree traversed in an Inorder traversal printed to output file and displayed on the screen. 4. Delete an entry. After the operation, the user can see the new binary search tree traversed in an Inorder traversal printed to output file and displayed on the screen. 5. Retrieve, dispaly and print the inorder predecessor of a given entry input by the user. 6. Retrieve, display and print the inorder successor of a given entry input by the user. 7. Seek command help of this software by entering the letter H. The command line commands are: H Display Help I Insert a value D Delete a value P Find predecessor S Find successor E Exit the program 8. Be informed when input data are invalid. Engineering Requirements 1. The software must be implemented in Java language. 2. The software must be written from scratch and use minimum Java library. Use excessive Java library will impact the points of this project you will get. 3. The software must be able to read: a. a series of integer entered by a user; b. a line of command entered by a user. 4. Insert and Delete functions/methods must use recursion. Otherwise, the developer will lose major points of this project. 5. The output file's name is: output.txt. 6. The software must be able to handle input that are invalid. 7. The software must inform user if it can't execute the command line. 8. The source codes should follow Java programming standard. 9. Programming best practices should be applied (ref. Lecture 1). Non-Functional Requirements None. Scope 1. No duplicate entries are allowed in the binary search tree. 2. Use the command line for user to provide information the software required. 3. The BST entries are integer. Expected Results Below is the content and the format expected for both output file and screen display. The user inputs are underlined: % java Project1 Please enter the initial sequence of values: 51 29 68 90 36 40 22 59 44 99 77 60 27 83 15 75 3 Pre-order: X X X ... X In-order: X X X ... X Post-order: X X X ... X Command? H I Insert a value D Delete a value P Find predecessor S Find successor E Exit the program H Display this message Command? I 88 In-order: X X X ... X Command? I 42 In-order: X X X ... X Command? I 22 22 already exists, ignore. Command? D 44 In-order: X X X ... X Command? D 90 In-order: X X X ... X Command? D 70 70 doesn't exist! Command? D 68 In-order: X X X ... X Command? S 75 77 Command? P 99 88 Command? E Thank you for using my program! % 

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question