Homework: B-Trees

Implement deletion the B-Tree implementation we looked at in class. (If you have not finished implementing an iterator for the B-Tree, finish that too.) The JUnit tests provided will help you determine whether your implementation works. However, I was not able (in the time available) to make JUnit tests that would exhaustively test all deletion scenarios; I will be inspecting your code, too.

For review, you can get the code from:

~tvandrun/Public/cs445/btrees/given

To get an Eclipse project set up correctly (or, to get an Eclipse project set up the way I prefer for my own usage), choose the folder containing the packages adt, impl, and test as the location for the project.

The starter code I have given you already contains a lot of structure for the operations you need to implement, including stubs for helper methods. Those are there to help you, of course. But you may choose to ignore all that and start from scratch if you want. If you do make sure you thoroughly document you code, even more so that you would anyway.

(Please note that my way of breaking down the problem in delete() with 1, 1a, etc, does not correspond exactly to how the algorithm is broken down an enumerated in the text (pgs 500-502).

Whether you use my suggested helper methods or not, make sure your style and documentation makes clear to a human reader (me) what you are doing. Don't document just to check off a requirement; document to communicate to another human (me). It's in your own interest to make your code easier to grade, isn't it? Documentation is your opportunity to present your code in the best light as possible.

To turn in, copy BTreeOMap (which should be the only file you've modified) to a turn-in folder:

/cslab.all/ubuntu/cs445/turnin/your-user-id/btrees

DUE Midnight between Oct 29 and Oct 30, 2014. Note that the homework for the String Matching chapter may be due around then too.


Thomas VanDrunen
Last modified: Wed Oct 22 11:51:31 CDT 2014