Find Jobs
Hire Freelancers

C++ Binary Tree

$100-500 USD

Completed
Posted almost 22 years ago

$100-500 USD

Paid on delivery
This assignment tests on 3 areas: designing code to use inheritance, coding an abstract data type, and incorporating these concepts into the creation of a binary search tree. In assignment nbr. 3 you are to create a binary search tree of nodes using a template format that will accept ints, floats and longs as the data elements. Create two base classes. One a class that encapsulates the data and pointer variables into a Node class. The other, a Tree class that encapsulates the pointer to the start of the tree and all mutator and accessor methods. Create a tree of 21 elements at program start. Be sure to balance the tree. Then, present the user with a menu that allows a user to: 1 - insert a node into the tree ( this should be 1 method, only). The user should be asked to input the value of the node. Don't allow duplicate values to be entered. 2- delete any single node. Again, print the tree and ask the user which node to remove. 3- check for the existence of any node value. The user should be asked for the value to find. If the value is in the tree , print a message similar to " node value 55 is the 3rd element in the tree" or " node value 109 not found in the tree". 4- print the entire tree. 5- clear the tree, i.e. remove all nodes from the tree and reset the start pointer to Null. You are to create a derived class that will accomplish this task. This will be a class derived from the Tree class. Remember, all nodes must be individually removed using the "delete" operator and the start pointer must be set to null. When the user chooses to clear the tree, ask if the tree is to be reinitialized. If the users chooses "yes" you are to use the "srand" and "rand" methods to create a new tree of 20 nodes attached to a root node with a value in the middle of the range of values to be added. For example, start a tree with a value of 50 as the first value. Then add random values around this root value. The menu should allow the user to change the primitive data type (i.e. show ints, floats and longs). NOTE: you are to include all the menu items and have them do exactly what is requested. This is called, in the programming community, as designing to spec. ## Deliverables Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. You can keep the copyright, I just need this code to get through with my course. ## Platform The code needs to run with no errors and no warnings on Microsoft Visual C++ 6.0 on PC systems. ## Deadline information Money is not an issue.
Project ID: 2852916

About the project

11 proposals
Remote project
Active 22 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
See private message.
$153 USD in 14 days
4.8 (44 reviews)
5.4
5.4
11 freelancers are bidding on average $207 USD for this job
User Avatar
See private message.
$425 USD in 14 days
5.0 (449 reviews)
8.6
8.6
User Avatar
See private message.
$170 USD in 14 days
4.4 (72 reviews)
5.5
5.5
User Avatar
See private message.
$102 USD in 14 days
5.0 (43 reviews)
4.8
4.8
User Avatar
See private message.
$255 USD in 14 days
5.0 (11 reviews)
4.2
4.2
User Avatar
See private message.
$127.50 USD in 14 days
4.7 (18 reviews)
4.0
4.0
User Avatar
See private message.
$106.25 USD in 14 days
5.0 (26 reviews)
3.8
3.8
User Avatar
See private message.
$425 USD in 14 days
4.7 (32 reviews)
3.3
3.3
User Avatar
See private message.
$340 USD in 14 days
5.0 (1 review)
3.0
3.0
User Avatar
See private message.
$85 USD in 14 days
4.9 (11 reviews)
2.8
2.8
User Avatar
See private message.
$85 USD in 14 days
0.0 (1 review)
0.0
0.0

About the client

Flag of UNITED STATES
United States
5.0
1
Member since May 26, 2002

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.