First Deliverable for project 2:
Due Monday 27 March 2006 by 8:00am
For my script to score your work you must:
- put your files at the top level of your turn directory
- provide your own Makefile
It would be a good idea to do this with vim. Get used to the basic commands. Also remember to go out and get a $20 whiteboard and some pens, you will need them to debug your program.
There is a script just for the tests you need to pass for part1
It is called run_part1_tests.pl
To get you off to a good start on this next assignment, which is long AND difficult,
I want you to get Root node insert, print and Verbose print working.
Make sure you have read through the requirement document.
Create a base class called Node. Subclass Node with a Broot and Bnode class.
You may call the subclasses whatever you want but name the base class Node.
Node should have AT least the following attributes:
- order
- id
- count
- max
- int* for data array
- Node** for pointer array
- split()
- destructor
Familiarize yourself with the meaning of "position" in a node.
To do this you will need search_within_node p541 Kruse he calls his search_node().
Try to understand how this function works. Position is an "output" parameter.
If this function returns success on an insert you have a duplicate.
push_down() is the basis for Kruse's insert algorithm.
Use Kruse's push_in() function on p545 to insert values into your root node.
Make sure you understand what this does.
To get the 5% credit for this portion you must pass ALL tests t01 - t07 (order 9 tests) AND _t01 - _t07 (order 13 tests).
Remember that when you move the data values along you must move the pointers as well.