Due in class on Monday, April 3
In this prelab, you will familiarize yourself with some of the design and implementation issues in the upcoming lab 7. Please write or type up your solutions, and hand in a paper copy before class on Monday. Remember, late prelabs receive zero credit.
In the previous lab, you created a WebPageIndex class that represents the data from a single document (either local file or URL). In this lab, you will be creating a collection of those indexes and then determining which page best matches what a user is searching for.
You will be using an ArrayList as an efficient implementation of a complete binary tree. One of the activities you will need to be able to do is to move up and down the tree.
In order to make these heaps work, you will need to create Comparators of various sorts. Begin by looking over the documentation for java.util.Comparator<T>. Pay special attention to the compare() method you are required to implement.
In the application portion of this lab, you will be reading in and creating a number of WebPageIndex objects (from Lab 6), storing them in your heap, and then processing user search queries on those objects. You should reveiw the WebPageIndex methods before answering the following questions/
Explain how you compute the "score" of a particular web page given a String that represents a user query of one or more words under the following conditions (pseudocode or just a concise description is fine, but you should refer to the WebPageIndex methods):
Our WebPageIndex objects allow us to also search for phrases in our web pages.