Then ask whether the user wants to add this new word to the


Write a program to manage a dictionary. Your dictionary should be stored on a text file named diction.txt and consist of an alphabetized list of words, one per line. When a user enters a word, scan the dictionary looking for the word. If the word is in the dictionary, say so. If not, display the dictionary word immediately preceding and the word immediately following so that user can see words that are close in spelling. Then ask whether the user wants to add this new word to the dictionary. If the answer is yes, do so and go back to request the next word.

To insert a word into a file in alphabetical order, simply copy the file to a new temporary file named diction.tmp and move words one at a time from the temporary file back to the original file, inserting the new word when you reach its correct position alphabetically. Turn in your source code and your diction.txt file.

 

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Then ask whether the user wants to add this new word to the
Reference No:- TGS0645241

Expected delivery within 24 Hours