Overview

The first part of your project consists of implementing the methods of the EmptyTree and NonEmptyTree classes.  We have provided a Tree interface and a partial implementation of the SearchTreeMap class (you must implement the keyList and subMap methods).  Complete documentation for these classes can be found at javadoc documentation.

The second part of your project consists of developing a simple news manager. Similar to an RSS reader, this manager will allow you to see news, and select which news to see from different sources.

Objectives

The objective of this project is to implement a polymorphic binary search tree.  This project is designed to help you develop your skills at recursion, polymorphism and testing.

Grading

Clarifications

Any clarifications or corrections associated with this project will be available at: Clarifications

Code Distribution

The project's code distribution is available by checking out the project named Bst. The code distribution provides you with the following:

Binary Search Tree Specifications

Testing

It is a required and graded part of your project that you develop and submit test cases that test your code. You only get two test cases in the class PublicTests, and the release tests all have unhelpful names such as testOne and testTwo. The TA's have been instructed that they should not help you debug your code unless you have written a test case on which your code misbehaves.

In addition to the release tests, there are additional secret test cases. Don't assume that just because your implementation passes the release tests, it is correct.

The WordCountApplet uses a SearchTreeMap to count the number of times each word appears in the file specified by a URL. You may use the applet to gauge how well your SearchTreeMap implemention works, simply select "Run As"->"Java Applet", then type in the URL of a file you wish to analyze. Here are some fun text files:

Design

The SearchTreeMap class implements some of the functionality of the Map interface (although not all). A SearchTreeMap object is just a wrapper around a Tree, which is actually used to implement binary search trees.

Note that the insert and delete methods on Tree objects return references to Tree objects. In many cases, these functions may return a reference to the this object. However, in some cases they can't. For example. EmptyTree.getInstance.insert("a", "1") has to return an instance of an NonEmptyTree object.

Design and Implementation Restrictions

The above restrictions do not apply to your test cases; you may write them however you wish.

News Manager Application

You will use the SearchTreeMap map to develop an application that allow us to examine news items present in text files. The project code distribution has a folder named "News" that provides sample files that can be used by the application you will write. The application will allow you to see news that have taken place in a particular period of time. You can see news from one source/feed or from several sources simultaneously. Notice that the application assumes the files reside in the local system. The format of each file entry is time, followed by the news item (e.g., 10:00am Free music concerts in Italy).

The following Video illustrates the functionality expected for this application.

Specifications

Requirements

Good Faith Attempt

The good faith attempt for this project is represented by the public test testGoodFaithAttempt. You must pass this test in order to satisfy the good faith attempt requirement.

Suggestions on How to Start/Implement This Programming Assignment