Assignment #2: Maps

The phone company would like to charge a premium price for certain numbers that are easily spelled as words on a standard phone. For instance, 305-348-2263 might be considered a premium number because 305-348-ACNE, 305-348-BAND, and 305-348-CANE are all 305-348-2263.

Write a program that finds the FOUR DIGIT phone number extensions that contain the FOUR OR MORE matching words, where the words will be contained in a dictionary located at http://www.cs.fiu.edu/~weiss/cop3530/words.txt. One of those number extensions is 2263. Your program should use the URL class to access the dictionary directly and you should print out the popular extensions along with the words that match.

Covers

java.util classes.

Strategy

For each word, compute its phonepad representation. You will use a Map in which the key is a String that is a phonepad representation, and the value is a List of all words that have the key as their phonepad representation. After constructing the Map, you simply need to find the long lists.

What To Submit

Submit complete source code and the list of phonepad extensions and words computed by your program.