Fig. 15.19 Digit Letters Digit Letters Digit Letters 2 ABC 5 JKL 8 TU V 3 DEF MNO W X Y 4 GHI 7 PRS 6.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Fig. 15.19
Digit
Letters
Digit
Letters
Digit
Letters
2
Авс
5
JKL
TU V
DEF
MNO
W X Y
4
GHI
7
PRS
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 (37) such combinations. Avoid phone numbers
with the digits 0 and 1.
Transcribed Image Text:Fig. 15.19 Digit Letters Digit Letters Digit Letters 2 Авс 5 JKL TU V DEF MNO W X Y 4 GHI 7 PRS 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 (37) such combinations. Avoid phone numbers with the digits 0 and 1.
15.7 (Telephone-Number Word Generator) Standard telephone keypads con-
tain 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 cor-
respondence 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 seven-letter
words, but most of these words represent unrecognizable juxtapositions of let-
ters. It's possible, however, that the owner of a barbershop would be pleased
to know that the shop's 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."
Transcribed Image Text:15.7 (Telephone-Number Word Generator) Standard telephone keypads con- tain 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 cor- respondence 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 seven-letter words, but most of these words represent unrecognizable juxtapositions of let- ters. It's possible, however, that the owner of a barbershop would be pleased to know that the shop's 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."
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY