Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using Java: On most telephone keypads the letters of the alphabet are mapped to various digits. In order to make their phone numbers more memorable,

Using Java:

On most telephone keypads the letters of the alphabet are mapped to various digits.

In order to make their phone numbers more memorable, service providers like to find numbers that spell out some word (called a mnemonic) appropriate to their business that makes that phone number easier to remember. For example, the phone number for a physician called Smith could be 377 -6484 (DRSMITH). Write a method listMnemonics that will generate all possible letter combinations that correspond to a given number, represented as a string of digits using a recursive function. This is a recursive backtracking problem, but you are trying to find all the "solutions", not just one. In fact you are trying to find all possible Strings using the English alphabet, not just Strings that are actual "words".

For example, if you call the method listMnemonics with the value 623 your method shall generate and return the following 27 possible letter combinations that correspond to that prefix:
MAD MBD MCD NAD NBD NCD OAD OBD OCD
MAE MBE MCE NAE NBE NCE OAE OBE OCE
MAF MBF MCF NAF NBF NCF OAF OBF OCF
Note, the order of these returned strings is unimportant.

Use the GUI depicted above to input required data. (you do not have to input a 7 – 10 digit number. Three digits will suffice)
I will let you decide how you wish to display the out from the inputted string.

Please add comments to your program!

image text in transcribed

1 GHI 4 PQRS 7 * ABC 2 JKL 5 TUV 8 DEF 3 MNO 6 WXYZ 9 0#

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Computer Performance Engineering 10th European Workshop Epew 2013 Venice Italy September 17 2013 Proceedings

Authors: Maria Simonetta Balsamo ,William Knottenbelt ,Andrea Marin

2013 Edition

3642407242, 978-3642407246

More Books

Students also viewed these Programming questions