data abstract amp structures lab bt lt bst adt

management-1300775-2
August 2, 2020
lap-report-and-assessment-1
August 2, 2020

data abstract amp structures lab bt lt bst adt

Lab: BT <— BST ADT

In this assignment we will create, display, and search a Binary Search Tree of College objects. You are encouraged to reuse as much code as possible from previous assignments/labs.

The assignment consists of the following classes/files:

  • BinaryNode.h (template, given)
  • BinaryTree.h (template, incomplete)
  • BinarySearchTree.h(template, incomplete)
  • main.cpp (incomplete)
  • College.cpp (incomplete)
  • College.h (incomplete)
    The program creates a BST of random integers. The insert and inorder traversal are given.

Your tasks:

  • reuse (with modifications if needed) the College class from previous assignments
  • rewrite the private insert as a recursive function
  • display the sorted data as shown below:
Inorder: 
 ABC    98   AB College                       9998 
 CC     10   Cuesta College                  19135 
 CPC    99   Cupertino College                9999 
// ... and so on
  • display the tree as an indented list as shown below
1). FC
..2). PCC
....3). SBCC
// ... and so on
  • display the leaves of the tree
 ABC    98   AB College                       9998 
 DAC    1    De Anza College                 19302 
 IVC    9    Irvine Valley College           20577 
// ... and so on
  • search the BST (recursive private search function)
 Search
=======

Enter a college code (or Q to stop searching) : 
College "FHC" was not found in this list.

Accept lower and upper case letters. For instance, if the user enters dAc, the search result will show data for De Anza College instead of displaying the “not found” message.

Also, it is left for you to decide where the functions in charge of displaying the leaves of the tree should be placed.

 

Submit Your Assignment and get professional help from our qualified experts!


data abstract amp structures lab bt lt bst adt was first posted on August 2, 2020 at 8:15 am.
©2019 "Submit Your Assignment". Use of this feed is for personal non-commercial use only. If you are not reading this article in your feed reader, then the site is guilty of copyright infringement. Please contact me at support@nursingtermpaper.org

 

"Is this question part of your assignment? We Can Help!"

Essay Writing Service