コード例 #1
0
ファイル: InputReader.cs プロジェクト: SENG3130/assignment-1
        public void readInput()
        {
            // Reads file and stores in LinkedList
            LinkedList <String> list = ReadFromFile();

            try
            {
                blackboard.setList(list); // Accesses Blackboard and sets list to input
            }
            catch (Exception e)
            {
                Console.WriteLine("Exception: " + e.Message);
            }
        }
コード例 #2
0
ファイル: Sorter.cs プロジェクト: SENG3130/assignment-1
        public void sort()
        {
            try
            {
                LinkedList <string> list;

                // Accesses blackboard and gets list
                list = blackboard.getList();
                list = Index(list); // List is sorted in alphabetical order

                // Blackboard accessed and sorted list is stored
                blackboard.setList(list);
            }
            catch (Exception e)
            {
                Console.WriteLine("Exception: " + e.Message);
            }
        }
コード例 #3
0
        public void rotate()
        {
            try
            {
                LinkedList <string> list;

                // Accesses blackboard and gets list
                list = blackboard.getList();

                list = Rotate(list); // The KWIC operation is performed on the list

                // Blackboard is accessed and the new list is stored
                blackboard.setList(list);
            }
            catch (Exception e)
            {
                Console.WriteLine("Exception: " + e.Message);
            }
        }