COSC 2327 Assignment #7

Due Date: scripted no later than Thursday, December 2, 2004
NO LATE ASSIGNMENTS ACCEPTED

You are to complete the following tasks:

You are to MODIFY assignment #6 so that your dictionary is stored in an AVL search tree. So adding words will need to rebalance the tree. You will NOT need to implement deletion for this assignment. You will need to put all words in the same case however. I suggest lowercase letters so that looking up a word in any case will find the word if its in the dictionary, case-insensitive.

You will need to be able to print the tree to a file in level order and in that print, include the balance factors at each node. Be sure to test this carefully.

LAST ASSIGNMENT!!! Your program should still do the following:

  1. Get name of data file from user to build the dictionary with.
  2. Create a binary search tree from that data file as a dictionary.
  3. Provide a menu driven portion of the program to do the following tasks:
    1. Save dictionary to a file (MUST BE A LEVEL ORDER TRAVERSAL) Must include balance factor at each node.
    2. Look up a word in the dictionary
    3. Add a word to the dictionary
    4. Print the dictionary IN-ORDER to the screen, and report total NUMBER of words in the dictionary at the end of the print out and the balance factor of each node with the word.
  4. You will need to test your program to show that all functions work. You should use this test list to test your program.
  5. Here is a test data file for you to use for testing your program, I would suggest using a smaller file during your preliminary testing phase.

Hand in:
  1. Your program code (nicely documented.)
  2. Your output script
  3. Your final output file (the levelorder traversal).
Grade Based on:
20% well-organized testing of code with handwritten labels.
20% well-documented, modular code.
40% correctness of code.
20% style and readability, neatness.


Last revised: