This assignment has you writing another tree-based Map. Unlike the last one, this one will always be balanced because it will be an AVL tree. Most of the details of this assignment are the same as for the BST Map, so I'm not going to repeat them here. The main things are changing from that assignment are the following.
You will have code for rotations.
Write one function for rotate-left and one for rotate-right. Use the pseudocode in the book.
The fix-up function will call these appropriately when needed. You don't need to write double-rotation functions.
At the end of insert and remove, you will do a fix-up that starts at the lowest node changed and walks back up to the root.
This function must check for rotations and perform them if necessary.
It should also make sure that all heights are set properly on the path back up the tree.
I recommend having this function walk all the way to the root instead of trying to optimize it to stop partway.
I've added a treeHeight function to the public interface that I can use to verify your tree is the correct height.
In the case of a tie between grandchildren, do a single rotation.
Put your unit test in the test folder. When you run gradle test it will generate test coverage. That is put in the file app/build/jacocoHtml/csci2320/index.source.html. The number of points you get depends on your coverage of the files where you are adding code. Full points for 95% coverage or better. Half points for 90-95% coverage. Quarter points for 80-90% coverage.
You can run the speed test that I will use by running gradle run and entering "speed". The output will be different at different times and on different computers, but on a given computer you should be able to check when you make changes that make it run faster.