Lab #5

Standard telephone keypads contain the digits 0 through 9. Digits 2 through 9 each have three or four letters associated with them, as follows:
  • 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

Each 7 digit phone number corresponds to many separate 7 letter words. One of the possible letter combination for the number 639-2277 is "NEWCARS".

Write a program that, given a seven digit number, writes to a file every possible combination corresponding to that number. Avoid phone numbers with digits 0 or 1.

Q: How many such combinations are there?

The program has a GUI that allows the user to enter the phone number. The GUI also allows browsing by using the file chooser, to find the output file and allows for a text area to display the contents of the file.

A sample file is provided