Question: Overview You will write a Java application to build and search a B-Tree. This will include: Node, RootNode, LeafNode classes, and a main class You
Overview
You will write a Java application to build and search a B-Tree. This will include: Node, RootNode, LeafNode classes, and a main class
You will need to make test cases for your tree. You can build the tree in your main class by calling the constructors, which are
LeafNode(Collection
RootNode(int min, int max, Collection
Data Structures
You will need to build a Node object to be the base class for the following two node types:
RootNode - holds a start of the range, end of the range and some number of Nodes (can be RootNodes or LeafNodes).
LeafNode - holds any number of integer values.
There should be a single RootNode that is the "top" of the tree. Its range should encompass the range of the whole tree.
Searching
If the current node is a RootNode and the number that we are looking for is between the start and end of the range, follow the nodes that are descendents of this RootNode. If the current node is a LeafNode, check each value of the leaf node to see if it matches the value that we are searching for.
Rules:
1) No iterators, loops or Java functions that iterate for you. All iteration must happen by recursion.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
