Write a menu driven program that either accepts words and ...
Write a Java program that either accepts words and their meanings, or displays the list of words in lexicographical order (i.e. as in a dictionary). When an entry is to be added to the dictionary you must first enter the word as one string, and then enter the meaning as separate string. A word may have more than one meaning, and may be entered at separate times. When this occurs, place each successive meaning on a separate line. This new meaning must be preceded by a dash. For example, if you enter the following words and with their meanings in the following order: Library, School, Cup, and School, then your output should be a display as shown in the Figure 1.
Figure 1.
Another requirement - from time to time words become obsolete. When this happens, such word must be removed from the dictionary.
Use the JOptionPane class to enter the information.
Use the concept of linked list to carryout this exercise. You will need at minimum the following classes:
• A WordMeaning class that hold the name of a word and its meaning.
• A WordMeaningNode class that creates the node of information and its link field.
• A WordList class that creates and maintain a linked list of words and their meanings.
• A Dictionary class that test your classes.
For the output, the program should produce two scrollable lists:
• The current list of words and their meanings, and
• The list of the deleted words. You need not list the meanings, just the words.
NB. The linked list must be designed from first principle. Do not use the pre-defined class LinkedList found in java.util; nor array; nor ArrayList class.
-----------------------
Cup – a container from which we drink.
Library – a collection of books
School – a place of learning
- any group of fish
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
Related searches
- write a review on a company
- a z dictionary words and definition
- how to write a policy and procedure
- program that alphabetizes lists
- free program that increases photo resolution
- write a document and then print it
- program that tells u info about pc
- program that tells me my computer specs
- program that rewords sentences
- words that start with y and meaning
- windows 10 change program that opens file
- write a letter online and print it