A menu driven program that implements a simple BST-based database

Description

Write a menu-driven program that implements a simple BST-based database.

The program reads data from a text file and inserts them into the BST. Once the tree has been built, present the user with a menu:

T – Print tree as an indented list (show level numbers)// see below
S – Search by a unique key (student ID)
B – Tree Breadth-First Traversal: Print by level (Use the CIS22C queue library, no STL please)
Q – Quit.
2. Recursive Depth-First Traversals
4. Print Tree
5. Find and Print Longest Branch
8. Destroy Tree
9. main()
2. 70
3800 Lee, Victor; 2.8
3000 Brown, Joanne; 4.0
3500 Marcus, John; 3.2
1900 Walljasper, Bryan; 3.9
4300 Trapp, Amanda Elizabeth; 4.0
2100 Andrews, Dennis; 2.9
3900 Brown, Joanne; 3.5
5000 Lee, Lucy Marie; 3.4
2800 Brown, Joanne; 2.6
4200 Brown, Joanne; 4.0
3300 Lee, Victor; 3.6
1500 Marcus, John; 4.0
2500 Lee, Mary; 3.8

 

 

D – Depth-First Traversals: inorder, preorder, postorder

I – Iterative Depth-First Traversals: inorder, preorder, postorder (use a stack)  (Use the CIS22C stack library, no STL please)

R – Find the longest branch and print it (from leaf to root) // See class example.

A – This is a hidden option. When chosen, display the name of the developer.

H – Help – to show the menu, and

Provide at least one test case for each option, except for search, for which provide more test cases. Send the output to the screen. When done, copy and paste it to BST_Output.txt.

Grading:

1. Build BST

3. Breadth-First Traversal

7. Search BST

Binary Tree (With 50 As the Root):

50

20                               70

10            40               60            80

A print tree as an indented list

1. 50

3. 80

3. 60

2. 20

3. 40

3. 10

Input File: gpa.txt (see next page).

To test your program create an input file using the data shown below and name it gpa.txt

Calculate the price of your order

Simple Order Process

Fill in the Order Form

Share all the assignment information. Including the instructions, provided reading materials, grading rubric, number of pages, the required formatting, deadline, and your academic level. Provide any information and announcements shared by the professor. Choose your preferred writer if you have one.

Get Your Order Assigned

Once we receive your order form, we will select the best writer from our pool of experts to fit your assignment.

Share More Data if Needed

You will receive a confirmation email when a writer has been assigned your task. The writer may contact you if they need any additional information or clarifications regarding your task

Let Our Essay Writer Do Their Job

Once you entrust us with your academic task, our skilled writers embark on creating your paper entirely from the ground up. Through rigorous research and unwavering commitment to your guidelines, our experts meticulously craft every aspect of your paper. Our process ensures that your essay is not only original but also aligned with your specific requirements, making certain that the final piece surpasses your expectations.

Quality Checks and Proofreading

Upon the completion of your paper, it undergoes a meticulous review by our dedicated Quality and Proofreading department. This crucial step ensures not only the originality of the content but also its alignment with the highest academic standards. Our seasoned experts conduct thorough checks, meticulously examining every facet of your paper, including grammar, structure, coherence, and proper citation. This comprehensive review process guarantees that the final product you receive not only meets our stringent quality benchmarks but also reflects your dedication to academic excellence.

Review and Download the Final Draft

If you find that any part of the paper does not meet the initial instructions, send it back to us with your feedback, and we will make the necessary adjustments.