Cosc 2P03 Fall 2017
Assignment#3

(Due date for assignment is Monday Nov. 6th 4:00 p.m., Late date Thursday Nov. 9th, 4:00 p.m.)
Data Input Below.

Objective

To implement an AVL tree with deletion.

The Assignment

Implement a BST which has a String element and thus represents the Key as well; add an integer variable C which will represent the number of occurrences of the element. Your BST should support the following operations. Insert, Delete and InOrder. Each of the preceding operations should be implemented recursively where appropriate. In the event of like elements you are to increment the count C field.

The BST should support AVL. Thus on every insertion or deletion you should insure that the tree is AVL complaint. To help support this, write a method IsAVL() which will return a Boolean if the tree is or is not AVL.

Load the BST with the supplied data. Print a SOT of this data (String  element and count). As well, run isAVL and print the result of this.

Rescan the input data and remove ever element from the tree which starts with a letter between (d - n or D - N inclusive). Print a SOT and run isAVL as above.

Data Input Above.
The data for this assignment is the text between but not including the headings Data Input Below and Data Input Above. You are to treat each word as case sensitive. You may ignore punctuation, brackets, white space and hyphens. A word can be a number. All words are to be trimmed removing leading and trailing spaces.

Output expected:

Suggestions

Verify that your algorithms for insert, delete and IsAVL give the correct results. Use a small test data set that you control. Try drawing the trees by hand for these small test sets. Once you have confidence that it works on the small set then graduate to the larger data set.

Submission Requirements:

Good Luck