title: LinkedList Nodes
body: <p>I have a question about an assignment that i am being required to complete. 
  Write a menu driven 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. </p>
  
  <p>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.</p>
  
  <p>The question concerns the second bullet. I am not sure about how to go about creating a constructor for WordMeaningNode. This is what I have so far:</p>
  
  <pre><code>import java.lang.*;
  import java.util.*;
  public class WordMeaningNode 
  
  
  {
    String information;
    WordMeaningNode locale;
  
  
  
  
    public WordMeaningNode(WordMeaning data) 
  //WordMeaning is a class that takes two strings(Word and definition) and stores it.
  //Entry is a method that returns the strings stored in WordMeaning.
  
    {
        information = data.Entry();
        locale = null;
    }
  
    public String getMeaning()
  
    {
        return information;
    }
  
    public WordMeaningNode getNext()
  
    {
        return locale.getNext();
    }
  
  }
  </code></pre>