You are required to create a personal dictionary and spellcheck program. There must only be two...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
You are required to create a personal dictionary and spellcheck program. There must only be two core classes. A class "WordInfo" and a class "Dictionary". The information stored on a wordInfo object consists of: A word: a string A meaning: a string The dictionary class is responsible for holding all the words and supports the following operations: - public bool add (string word, string meaning) adds a new word to the dictionary. No duplicate words are allowed. You must store all the words in all array of size 1500. All words should be stored in lowercase. public bool delete (string word) - deletes the wordInfo object with the matching word. public bool exists(string word) returns true if the word is in the dictionary and false otherwise. public String getMeaning(string word)- returns the meaning of the word. public int getCount() - returns the number of words in the dictionary. Note that is must be implemented even if not used. public string printWordList () returns a list of all the words stored in the dictionary in alphabetical order (only the words, not the meanings). public void printDictionary()- prints the full word and meaning for each wordInfo object in the dictionary (in ascending order). Your program must first load all known words from the text file "wordlist.txt" into the dictionary class you created (which stores all the word in the array as sorted). NOTE that this list does not contain any definitions and none need to be created. Only new words need definitions. The words loaded from the file should have "Undefined word" as the definition. Create a main program with the following menu options: 1: Add new word - 2: Delete word 3: Get meaning 4: Dictionary list 5: Spell check a text file. 6: Exit Notes: Add new word - This option should request a word and its meaning. Insert the word into the dictionary if it is new. No duplicates are allowed. All words are to be stored in lowercase letters. Delete word - This option should request a word and delete it from the dictionary. Get meaning - This option should request a word and print its meaning if found in the dictionary. If it is not found an appropriate message must be shown. Dictionary List- This option must simply list all the words contained in the dictionary. Note that the meanings should not be listed. Spell check a text file- This option should prompt the user for a text file. You may assume the text file contains only sentences with words and the only punctuation allowed are periods (.), commas (,). You must print all the word that are not in the dictionary. Please note this must still work regardless of the case of the letters. Exit - This option should exit the program. You are required to create a personal dictionary and spellcheck program. There must only be two core classes. A class "WordInfo" and a class "Dictionary". The information stored on a wordInfo object consists of: A word: a string A meaning: a string The dictionary class is responsible for holding all the words and supports the following operations: - public bool add (string word, string meaning) adds a new word to the dictionary. No duplicate words are allowed. You must store all the words in all array of size 1500. All words should be stored in lowercase. public bool delete (string word) - deletes the wordInfo object with the matching word. public bool exists(string word) returns true if the word is in the dictionary and false otherwise. public String getMeaning(string word)- returns the meaning of the word. public int getCount() - returns the number of words in the dictionary. Note that is must be implemented even if not used. public string printWordList () returns a list of all the words stored in the dictionary in alphabetical order (only the words, not the meanings). public void printDictionary()- prints the full word and meaning for each wordInfo object in the dictionary (in ascending order). Your program must first load all known words from the text file "wordlist.txt" into the dictionary class you created (which stores all the word in the array as sorted). NOTE that this list does not contain any definitions and none need to be created. Only new words need definitions. The words loaded from the file should have "Undefined word" as the definition. Create a main program with the following menu options: 1: Add new word - 2: Delete word 3: Get meaning 4: Dictionary list 5: Spell check a text file. 6: Exit Notes: Add new word - This option should request a word and its meaning. Insert the word into the dictionary if it is new. No duplicates are allowed. All words are to be stored in lowercase letters. Delete word - This option should request a word and delete it from the dictionary. Get meaning - This option should request a word and print its meaning if found in the dictionary. If it is not found an appropriate message must be shown. Dictionary List- This option must simply list all the words contained in the dictionary. Note that the meanings should not be listed. Spell check a text file- This option should prompt the user for a text file. You may assume the text file contains only sentences with words and the only punctuation allowed are periods (.), commas (,). You must print all the word that are not in the dictionary. Please note this must still work regardless of the case of the letters. Exit - This option should exit the program.
Expert Answer:
Answer rating: 100% (QA)
Here is a basic implementation of the two core classes WordInfo and Dictionary in C csharp using System using SystemCollectionsGeneric public class WordInfo public string Word get set public string Me... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these organizational behavior questions
-
Predictive text entry systems are familiar on touch screens and mobile phones. This question asks you to consider how the same principles might be used in a programming editor for creating Java code....
-
You are required to write a Python program that will manage character (heroes and villain) information. Character (hero and villain) information will be stored in a text file that will be read in...
-
In Exercises find the positive values of p for which the series converges. n=1 n
-
Jamal Hamza is considering building an investment portfolio containing two stocks, L and M. Stock L will represent 40 percent of the dollar value of the portfolio, and stock M will account for the...
-
Assuming that exotic states exist in the susd system, express in spectroscopic notation the lowest states that would be expected and give their corresponding J P values.
-
Solve Problem 10.12 with a damping ratio of 0.75 . Data From Problem 10.12:- Determine the maximum percent error of an accelerometer in the frequency-ratio range \(0
-
Sharp Paper Inc. has three paper mills, one of which is located in Memphis, Tennessee. The Memphis mill produces 300 different types of coated and uncoated specialty printing papers. This large...
-
You also sell into the market for flints, which is perfectly competitive.The marginal cost of flints is also $1. Some Flint consumers also value chert, but some do not. The demand curve for flint by...
-
"It's close to a $40,000 loser and we ought to devote our efforts elsewhere," noted Cindy Mires, after reviewing financial reports of her company's attempt to offer a reduced-price daycare service to...
-
Phasors are useful for adding waves that are out of phase. For example, assume you have two sources, 1 and 2, that emit sound waves of the same frequency \(f\). At your detector, the waves from...
-
One of the original aims of the Seventh Directive was to assist with the supervision of multinational enterprises by their host countries. Examine and discuss arguments for and against such a desire...
-
Two tuning forks are struck simultaneously, the first one having a frequency of \(762 \mathrm{~Hz}\). If a nearby listener hears 20 beats per second, determine the possible frequency or frequencies...
-
Two violin players are next to each other on a theater's stage. One plays a \(350-\mathrm{Hz}\) note, while the other simultaneously plays a \(353-\mathrm{Hz}\) note. (a) What is the beat frequency...
-
Two stationary tuning forks with frequencies of \(246 \mathrm{~Hz}\) and \(252 \mathrm{~Hz}\) are struck simultaneously. Calculate the frequency of the resulting sound. \(\cdot\)
-
Fundementals of Info Security 1. Create a text file using Notepad (or another text editor of your choice). 2. Type the name in the paremthsis in the file only (Sergio Villarreal): Please make sure of...
-
Nike manufactures shoes and sportswear. How has the Internet changed the way this company communicates with its suppliers and retail customers?
-
Walter, a single taxpayer, purchased a limited partnership interest in a tax shelter in 1985. He also acquired a rental house in 2012, which he actively manages. During 2012, Walter's share of the...
-
Kent Pham, CPA, is a 45-year-old single taxpayer living at 169 Trendie Street, La Jolla, CA 92037. His Social Security number is 865-68-9635. In 2012, Kent's W-2 as the controller of a local...
-
Larry Gaines, age 42, sells his personal residence on November 12, 2012, for $144,000. He lived in the house for 7 years. The expenses of the sale are $10,500, and he has made capital improvements of...
-
A tapered circular bar is rigidly fixed at both the ends as shown in Fig. 13.45. If the temperature is raised by \(50^{\circ} \mathrm{C}\), calculate the stress in the bar. Take \(E=202...
-
A trapezoidal flat steel plate of thickness \(10 \mathrm{~mm}\) tapers uniformly from a width \(150 \mathrm{~mm}\) to \(100 \mathrm{~mm}\) in a length of \(500 \mathrm{~mm}\). Calculate the extension...
-
On the principal planes, the maximum stress is the (a) normal stress (b) shear stress (c) both normal and shear stress (d) either normal or shear stress
Study smarter with the SolutionInn App