CSCI.4220/CSCI.6964 Network Programming

Fall, 2002

Programming Assignment 0.


This assignment is to be done either individually or in pairs. Do not show your code to any other group and do not look at any other group's code. Do not put your code in a public directory or otherwise make it public. However, you may get all the help you need from the TAs or the instructor. You are encouraged to use the WebCT Discussions page to post problems so that other students can also see the answers.


The goal of this assignment is to get familiar with the Java platform for network programming. You are required to write a simple HTTP client that gets as input a given URL, retrieves the corresponding page, and  returns the list of all words and their occurrences in the requested page sorted by the number of occurrences.

You will use the URL class which is an abstraction of the URL identifier. It allows to open a connection to a specific URL, read data from it, and perform a set of operations on the URL. More details about this class can be found in this link:

All exceptions must be properly handled.


A possible extension to the project is to include a depth level in the input, i.e. the user will input besides the URL a level and the output will be the sorted list of word/occurrences starting from the target page up to the set level (the target page and the pages it is pointing to up to the required level). Completion of this extension will result in a better grade; however, groups of more than one person MUST complete this extension to receive a full grade. It should also be noted that, if you have an idea for a different extension, ask either the instructor or TAs for approval.


Grading will be split in the following way:


The due date for this project is September 10th, 2002, 11:55pm EST. You should use the assignments drop-off box located at the course's WebCT page. Upload a JAR file containing all the relevant documented Java files, along with a README file describing the project and its usage.