Tree Lab: Word count
Learning Objective(s)
- Learn to code a binary tree and a binary search tree
- Improve understanding of cohesion and coupling
- Improve skill for developing test cases for best, average, worst situations
Overview of the problem
You need to do a word count on a text file. You must use a binary search tree to store the words.
Specifics
- You may be case sensitive.
- You can treat non characters and non white spaces as part of the word.
- The filename should come from the command line (but this should be the very last thing you work on)
Design components
- In your design decide if you will implement this with linked lists or an array. Justify your choice
- Discuss possible best, worst, and average cases
- Your tree should not know what is being stored in it.
Optional improvements
- Make your code case insensitive.
- Ignore non characters/non white spaces
- Make the binary search tree an AVL tree