Due Saturday, 10/21, by 11:59PM.
This is an individual project and you are required to work on this project alone.
You can ask the Instructor for help but not for debugging your code.
1. Standard telephone keypads contain the digits zero through nine. The numbers two through nine each have 3~4 letters (case insensitive) associated with them. Many people find it difficult to memorize phone numbers, so they use the correspondence between digits and letters to develop seven-letter words that correspond to their phone numbers. For example, a person whose telephone number is 686-2377 might remember it as "NUMBERS."
2 A B C
3 D E F
4 G H I
5 J K L
6 M N O
7 P Q R S
8 T U V
9 W X Y Z
2. Each seven-letter word corresponds to exactly one seven-digit telephone number, but a seven-digit number corresponds to many seven-letter strings, most of which are not words.
3. Create a Project2 class under the project package.
4. In this project you will develop a program which will find all the corresponding English words given any specific telephone number. Here are the detailed requirements:
a. In the Project2 class you will create a static void test() method.
b. The test method will first ask the user to type in through keyboard a 7-digit telephone number.
c. If the number typed in by the user is not 7 digits or the number contains some number of the digit ‘0’ or ‘1’, then your program reports an error and asks to type in another number.
d. If the number typed in by the user is a 7-digit telephone number made up of the digits ‘2’ through ‘9’, then your program will print out all the possible English words corresponding to the telephone number (and the total number of them), using the given English word library in the “COSC241_P2_EnglishWordList.txt”.
e. The “COSC241_P2_EnglishWordList.txt” file should be located in the folder where your project folder is located (i.e. this file and your project folder are sitting next to each other). This way when you zip your project folder to submit the “COSC241_P2_EnglishWordList.txt” file will not be zipped into the zip file.
f. NOTE: When you open files for read or write you cannot use an absolute file path but have to use a relative file path. After you finished your program make a copy of your program folder and try to run it on another computer to see whether it still works.
g. Your program needs to finish the execution within 20 seconds (on the lab machines) after it received a valid telephone number to look up the corresponding English words.
h. If your program not only print out all the single-English-word corresponds (or report none if there is none) but also two-English-word corresponds (for example, “LOVE YOU” corresponds to the number 5683968), you can gain 20 bonus points. If your program can print out all possible English word (single, two, and more) corresponds then you can gain an additional 30 bonus points. If your program did do the bonus point part, please let the instructor know by specifying it in the submission comments.
5. Under the main package, in the Main class, remove the contents of the main method we have added in the last lab (or project) and do the following:
6. Compile and test your implementation.
1. Please zip your top project folder and you should get a file with this name:
COSC241<your section number>_<your username>.zip
2. Be sure to unzip the above file and try the program out to make sure zip works correctly.
3. Then submit your zip file to Blackboard corresponding submission folder.
1. Grading of this program is based on:
a. Whether your program performs as it should (60%);
b. Whether your program has the correct logical structure (30%);
c. Whether you program follows the recommended programming style (10%).
2. The total of this project is 100 points (excluding the 10 bonus points).