Example #1
0
 /// <summary>
 /// 
 /// </summary>
 public Listener()
 {
     //initialize member variables
     Console.WriteLine("listner entered");
     m_nounList = new XmlDataAccess("xmlNounList.xml");
     m_verbList = new XmlDataAccess("xmlVerbList.xml");
     m_dictionary = new Dictionary("xmlGreetingList.xml", "xmlNounList.xml", "xmlVerbList.xml");
     Console.WriteLine("listener constructor finished");
 }
Example #2
0
        public InOut()
        {
            // the Greetings Class is about outdated and needs to be removed and its functionality placed in a more
            // logical location such as the sentence class as a type of interjection sentence that functions as a greeting
            // and access of its word list should go through listener just like nouns and verbs.

            //yes I probably could have used the xmlDataAccess Class instead of setting up the functionality of the Dictionary class

            currentSentence = new Sentence();
            xmlDataAccess = new XmlDataAccess("XMLGreetinglist.xml");
            listener = new Listener();
            InitializeComponent();
            greetings = new Greetings(xmlDataAccess);
              currentDictionary = new Dictionary("XMLGreetingList.xml","xmlNounList.xml","xmlVerbList.xml");
        }
Example #3
0
 // constructor
 public Greetings(XmlDataAccess dataobject)
 {
     // Create the DataAccess access object.
     daobj = dataobject;
     getwords();
 }