Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In C++ In this individual assignment, you will create a binary search tree for a word-based dictionary. The suggested use is that of learning a
In C++
In this individual assignment, you will create a binary search tree for a word-based dictionary. The suggested use is that of learning a new language. The data dass will consist of a word and its translation or meaning. An alternative implementation for this assignment would consist of words in a glossary and their meaning. Your binary search tree will be a collection class similar to the list classes we worked with earlier. The tree class will have a root data attribute that will also be a node pointer, thus making the tree a collection of nodes with their data and node pointers. Use the word as the sorting key for your binary search tree. When the program starts, it should read an initial group of at least 16 data abjects and add those objects to a binary search tree. The words should be placed in the tree according to the alphabetical order but should not be added to the tree in alphabetical order to keep the tree reasonably balanced After the data has been loaded from the text file, a menu should appear that prompts the user to (1) add a word and its meaning, (2) edit a word, (3) find and display a word, (4) view all words in a list, (5) show flashcards, (6) delete a word, or 7) quit the program. When the program quits, all the words in the current program, indluding thase just added, are saved to the text file so that they will be available for the next time the program runs When the user chooses the fleshcard option, a new menu should appear prompting the user to choose between the following traversals: (1) in-order traversal, [2) pre-order traversal, (3) post-order traversal, or (4] random traversal. With the choice of traversal made, the words and their meanings should be displayed one by one incrementaly, with the word coming first, and then the user pressing a key for the meaning to appear. With the meaning the user should also be prompted to either (1) view next word or (2) quit traversalStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started