# prog_asgn3 - Programming Assignment III COP3502H Due...

This preview shows pages 1–3. Sign up to view the full content.

Programming Assignment III COP3502H Due: 3/2/07 11:59pm to Web CT The CEO of the Computer Sciences Corporation, Dr. Link Queue has decided that the second product in the company’s arsenal of applications will be a tool that determines what words (i.e., combinations of letters) can replace a seven digit telephone number. For example, the number 866-2665 could be represented as “TOOCOOL”. In this assignment, you will develop a program that takes in a seven digit phone number and outputs all possible word combinations for that number. In addition, the program will analyze these combinations to find words that have correct spelling (this will help to prune out the gibberish). Your program will utilize recursion and trees. Requirements There are two parts to this assignment. Part I: Telephone Words In the first part, you will use the keypad shown in the figure for the mappings between letters and numbers. Your program should take as input a seven digit number (a string in this case) and output a list of all possible “words” that can represent the given number. Note that since 0 and 1 do not have letters they do not need to be changed. However, any phone number you give your program should be able to deal with 0’s and 1’s. Use the following function prototype void DoPrintTelephoneWords(int phoneNumber [], int curDigit, char result[]); where phoneNumber is an array of seven integers with each digit being one digit in the number, curDigit is an index to the current digit, and result stores the result. Assume that only valid phone numbers will be passed to your function. Also use char GetCharKey(int telephoneKey, int place);

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
which takes a telephone key (0-9) and a place of either 1,2,3,4 and returns the character corresponding to the letter in the key. Note for this part of the assignment you MUST use recursion. Part II: Spell Checking with a Trie
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 4

prog_asgn3 - Programming Assignment III COP3502H Due...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online