Question
1. Write a statement to create an instance of a class Dictionary that implements DictionaryInterface. Your dictionary contains Word objects that are lists of synonyms
1. Write a statement to create an instance of a class Dictionary that implements DictionaryInterface. Your dictionary contains Word objects that are lists of synonyms for words. The key value is a String representing the word to look up. Call your dictionary thesaurus. Answer:
2. Write a statement to create a key iterator for a dictionary called thesaurus that is an instance of the class Dictionary and implements DictionaryInterface. The search keys are strings and the values stored are Word objects. Answer:
3. Write a statement to create a value iterator for a dictionary called thesaurus that is an instance of the class Dictionary and implements DictionaryInterface. The search keys are strings and the values stored are Word objects. Answer:
TRUE/FALSE
1. In the ADT dictionary, search keys and values are paired. Answer:
2. The ADT dictionary organizes and identifies its entries by position. Answer:
3. Every entry in a dictionary has a search key. Answer:
4. Each entry in a dictionary may only have one key. Answer:
5. The ADT dictionary requires sorted entries. Answer:
MULTIPLE CHOICE: 1. A typical operation of an ADT dictionary is a. add a new entry given a search key and value b. remove an entry given a search key c. retrieve a value associated with a search key d. all of the above
2. A typical operation of an ADT dictionary is a. determining if the dictionary contains a specific search key b. traversing the dictionary by search keys c. traversing the dictionary by values d. all of the above
3. A typical operation of an ADT dictionary is a. traversing the dictionary by values b. removing an entry given a value c. both a & b d. none of the above
4. What ADT dictionary method creates an iterator that traverses all search keys in the dictionary? a. getKeyIterator b. keyIterator c. getKeys d. getIterator
JAVA LANGUAGE
Step 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