Question: IN C + + , CAN YOU MAKE A MAIN.CPP , BST . CPP , AND DOLLAR.CPP FILES ALL SEPARATE AND WORK TOGETHER WITH NO
IN C CAN YOU MAKE A MAIN.CPP BSTCPP AND DOLLAR.CPP FILES ALL SEPARATE AND WORK TOGETHER WITH NO HEADER FILES Follow all code styling and submission instructions as outlined for previous labs.
Declare and implement a BSTNode ADT with a data attribute and two pointer attributes, one for the left child and the other for the right child.
Implement the usual getterssetters for these attributes.
Declare and implement a BST as a linkbased ADT whose data will be Dollar objects the data will be inserted based on the actual money value of
your Dollar objects as a combination of the whole value and fractional value attributes.
For the BST implement the four traversal methods as well as methods for the usual search, insert, delete, print, count, isEmpty, empty operations
and any other needed.
Your pgm will use the following Dollar objects to be created in the exact order in your main to seed the tree:
$
$
$
$
$
$
$
$
$
$
$
$
$
$
$
$
$
$
$
$
Also, create an output file to write program output as specified in one or more instructions below.
After seeding the data, perform your traversal operations in the specific sequence of breadthfirst, inorder, preorder, postorder, ensuring that
output is written out to both screen and file concurrently.
Then provide interactivity for the user to addsearchdelete nodes from the console after the data has been seeded into the application.
Perform adequate input data validation when reading data from the user into the tree if any data item is invalid, ignore the data item and continue
to next item but print a message to output both screen and same output file to indicate which data items were ignored.
Also, provide the user the option to print output of traversals or exit the program. Once the user selects the option to print data or exits the
program, the data in the BST should be printed out to both screen and output file in all four traversal methods in the specific sequence of breadth
first, inorder, preorder, postorder.
For submission upload your BST DollarUSD and main code files, screenshots of console window and your output files only.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
