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:
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
-
If you were an investment advisor to the Abu Dhabi sovereign wealth fund, in which instruments, in which countries, would you recommend investing?
-
Find the title of a recent article from the Journal of Accountancy that discusses money laundering.
-
In spring 1989, Michael Jordan and the Chicago Bulls were in Indianapolis, Indiana, to play against the Indiana Pacers. At the same time, Karla Knafel was singing with a band at a hotel in...
-
AudioMart is a retailer of radios, stereos, and televisions. The store carries two portable sound systems that have radios, tape players, and speakers. System A, of slightly higher quality than...
-
A vehicle of mass m = 1500kg travels on a circular curve of radius R = 1km at a speed of v = 10m/s. There is static friction between the road and the vehicle's tires. R Road with a circular curve of...
-
Work on this in the following order: Flight, Aircraft, Reservation, FlightManager, FlightReservationSystem, LongHaulFlight, Passenger. And then the exception handling in FlightManager and...
-
What is an Early Payment Discount? 2. Why would you create a special term? What report can you run to see if there are any bills with discounts?
-
Can you explain the concept of a bank reconciliation statement in a simplified manner?
-
How do you handle errors or mistakes found during the bank reconciliation process? Explain briefly
-
Icey Industries manufactures air conditioning units. The company is a subsidiary of Icey Group and operates as an investment centre. Icey Group requires a cost of capital of 7 per cent. Extracts from...
-
What is the difference between reciprocation and mutualism? Explain briefly
-
For this computer assignment, you are to write a C++ program to implement classes to represent a binary tree (of integers) . You are required to implement assignment5.h and assignment5.cc files. Both...
-
A sample statistic will not change from sample to sample. Determine whether the statement is true or false. If it is false, rewrite it as a true statement.
-
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...
-
An exchange rate crisis occurs when the peg (the fixed exchange rate) loses its credibility. Bond holders no longer believe that next period's exchange rate will be this period's exchange rate. a....
-
Equation (20.5) provides insight into the movements of nominal exchange rates between a domestic and a foreign country. Remember that the time periods in the equation can refer to any time unit. The...
-
a. Download the series EXCHUS from the FRED database. This expresses the exchange rate between the yuan (one of the names for the Chinese currency) as the number of yuan per US dollar. Convert that...
Study smarter with the SolutionInn App