Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Standard telephone keypads contain the digits zero through nine. The numbers two through nine each have three letters associated with them (Fig. 15.19 ). Many

Standard telephone keypads contain the digits zero through nine. The numbers two through nine each have three letters associated with them (Fig. 15.19 ). 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 use the correspondence indicated in Fig. 15.19 to develop the seven-letter word NUMBERS. Every seven-letter word corresponds to exactly one seven-digit telephone number. A restaurant wishing to increase its takeout business could surely do so with the number 825-3688 (i.e., TAKEOUT). Every seven-letter phone number corresponds to many different sevenletter words, but most of these words represent unrecognizable juxtapositions of letters. Its possible, however, that the owner of a barbershop would be pleased to know that the shops telephone number, 424-7288, corresponds to HAIRCUT. A veterinarian with the phone number 738-2273 would be pleased to know that the number corresponds to the letters PETCARE. An automotive dealership would be pleased to know that the dealership number, 639-2277, corresponds to NEWCARS. Digit Letters Digit Letters Digit Letters 2 A B C 5 J K L 8 T U V 3 D E F 6 M N O 9 W X Y 4 G H I 7 P R S Fig. 15.19 Telephone keypad digits and letters. Write a program that, given a seven-digit number, uses a Formatter object to write to a file every possible seven-letter word combination corresponding to that number. There are 2,187 such combinations. Avoid phone numbers with the digits 0 and 1.

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

Advances In Knowledge Discovery In Databases

Authors: Animesh Adhikari, Jhimli Adhikari

1st Edition

3319132121, 9783319132129

More Books

Students also viewed these Databases questions

Question

Why is auditing described as a systematic process?

Answered: 1 week ago

Question

Differentiate Differentiate the function. G(x) = 4/x7 +7x G'(X)

Answered: 1 week ago

Question

Provide examples of KPIs in Human Capital Management.

Answered: 1 week ago

Question

What are OLAP Cubes?

Answered: 1 week ago