Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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!

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

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

9th Edition

B01JXPZ7AK, 9780805360479

More Books

Students also viewed these Databases questions

Question

To find integral of sin(logx) .

Answered: 1 week ago

Question

What is Centrifugation?

Answered: 1 week ago