Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
CSI 202
Problem Statement
Your task is to use a binary tree as the data structure to create a dictionary by storing a list of known words in a tree and then comparing the words in another file against those words.
Design and write a C++ program that reads a file of text called p5dict.txt and stores each unique word in some node of a binary search tree. Next, read the words from a second data file and search for them in the tree. If a word from the second file p5suspect.txt is found in the dictionary tree, it is treated as being correct and nothing more needs to be done. If a word from the second file is not found, two possibilities exist: either it is correctly spelled – in this case the program asks the user if this word should be inserted into the binary tree; if the user answers ‘y’ or ‘Y’, it is inserted in the dictionary; if the user answers ‘n’ or ‘N’, the word is considered to be mis-spelled and is printed out with a status message to that effect.
Implementation Guidelines
All work is to be done under the Linux operating system on Sam. Files from Sam must be brought across to your computer for printing, using Fugu or WinSCP. Do not use MS Word to open the file on your local machine.
Programs must be commented properly, lines must be indented consistently and the names of the variables must be short and indicative of the purpose or type of the variable.
Your written report must be free of ordinary grammatical and syntactical errors. Use a spelling checker.
Submission Specifications
Submit the following to Canvas no later than midnight on Dec 04, 2019
The script file called yourname.txt (use your own name) contains the log of your entire terminal session. This is the file that must be printed and submitted.
Policy on Consulting Others
You are not permitted to use any source other than your textbook, your instructor, or the tutors from the QS center. You may discuss the projects at a high level of abstraction with your classmates as long as you do not give or receive programs or code fragments from them.