PART B – Java Programming, Data Design, and Data Structures, 45 points
We are hired to implement an interactive dictionary. Our dictionary takes input from users and uses the input as search key to look up values associated with the key. Requirements:
Coding: No hard coding, https://en.wikipedia.org/wiki/Hard_coding .
- Data Source: Store the original data in a set of enum objects. Each keyword, each part of speech, and each definition must be stored in a separate data field. Do not combine them such as storing three parts in one String.
- Data Structure: Use existing data structure(s) or creating new data structure(s) to store our dictionary’s data.
- Data Loading: When our program starts, it loads all the original data from the enum objects into our dictionary’s data structure.
- User Interface: A program interface allows users to input search keys and displays returned results. Our program searches the dictionary’s data (not the enum objects) for values associated with the search keys.
- Identical Output: Our program’s output must be identical to the complete sample run’s output. The complete output is : Sample OutPut
1. Program Analysis to Program Design, 10 points
In 1 full page, please explain the following in detail:
▪ Your analysis of the provided information and the provided sample output.
▪ What problem you are solving.
▪ How you store data in enum objects. And why.
▪ Which data structure(s) you use/create for your dictionary. And why.
In 1 full page, please explain the following in detail:
2. Program Implementation, 35 points
▪ Does your program work properly?
▪ How will you improve your program?
▪ Sample run:
------------------------------------------------------------------
Sample Output:
! Loading data...
! Loading completed...
-----DICTIONARY 340 JAVA-----
Search: pLacehOLder
|
Placeholder [adjective] : To be updated...
Placeholder [adjective] : To be updated...
Placeholder [adverb] : To be updated...
Placeholder [conjunction] : To be updated...
Placeholder [interjection] : To be updated...
Placeholder [noun] : To be updated...
Placeholder [noun] : To be updated...
Placeholder [noun] : To be updated...
Placeholder [preposition] : To be updated...
Placeholder [pronoun] : To be updated...
Placeholder [verb] : To be updated...
|
Search: pLACEholder distinct
|
Placeholder [adjective] : To be updated...
Placeholder [adverb] : To be updated...
Placeholder [conjunction] : To be updated...
Placeholder [interjection] : To be updated...
Placeholder [noun] : To be updated...
Placeholder [preposition] : To be updated...
Placeholder [pronoun] : To be updated...
Placeholder [verb] : To be updated...
|
Search: pLaCEholder noun
|
Placeholder [noun] : To be updated...
Placeholder [noun] : To be updated...
Placeholder [noun] : To be updated...
|
Search: placeholder noun distinct
|
Placeholder [noun] : To be updated...
|
Search: placeholder adjective
|
Placeholder [adjective] : To be updated...
Placeholder [adjective] : To be updated...
|
Search: placeholder oops
|
<2nd argument must be a part of speech or "distinct">
|
Search: csc210
|
CSC210 [adjective] : Comfortable with Objects and Classes.
CSC210 [adjective] : Ready for CSC 220.
CSC210 [noun] : Intro to Java.
CSC210 [verb] : To learn Java.
|
Search: csc220
|
CSC220 [adjective] : Ready to create complex data structures.
CSC220 [noun] : Data Structures.
CSC220 [verb] : To create data structures.
|
Search: csc340
|
CSC340 [adjective] : = C++ version of CSC210 + CSC220 + more.
CSC340 [noun] : A CS upper division course.
CSC340 [noun] : Many hours outside of class.
CSC340 [noun] : Programming Methodology.
|
Search: csc340 noun distinct
|
CSC340 [noun] : A CS upper division course.
CSC340 [noun] : Many hours outside of class.
CSC340 [noun] : Programming Methodology.
|
Search: Facebook
|
|
Search: verb
|
Verb [noun] : Verb is a word or group of words that expresses an action (such as eat), an event (such as happen) or a state (such as exist).
|
Search: verb verb
|
|
Search: verb noun
|
Verb [noun] : Verb is a word or group of words that expresses an action (such as eat), an event (such as happen) or a state (such as exist).
|
Search: book noun
|
Book [noun] : A set of pages.
Book [noun] : A written work published in printed or electronic form.
|
Search: book verb
|
Book [verb] : To arrange for someone to have a seat on a plane.
Book [verb] : To arrange something on a particular date.
|
Search: bookABLE
|
Bookable [adjective] : Can be ordered in advance.
|
Search: conJUNCtion
|
Conjunction [noun] : Conjunction is a word that joins words, phrases or sentences, for example 'and', 'but', 'or'.
|
Search: interjection noun
|
Interjection [noun] : Interjection is a short sound, word or phrase spoken suddenly to express an emotion. Oh!, Look out! and Ow! are interjections.
|
Search: pronoun verb
|
|
Search: adjective noun
|
Adjective [noun] : Adjective is a word that describes a person or thing, for example big, red and clever in a big house, red wine and a clever idea.
|