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:
- Get name of data file from user to build the dictionary with.
- Create a binary search tree from that data file as a dictionary.
- Provide a menu driven portion of the program to do the following tasks:
- Save dictionary to a file (MUST BE A LEVEL ORDER TRAVERSAL)
Must include balance factor at each node.
- Look up a word in the dictionary
- Add a word to the dictionary
- 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.
- You will need to test your program to show that all functions work.
You should use this test list to
test your program.
- 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:
- Your program code (nicely documented.)
- Your output script
- 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: