15.7 (Telephone-Number Word Generator) 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 correspon- dence between digits and letters to develop seven-letter words that correspond to their phone num- bers. 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 cor- responds 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.c., "TAKEOUT"). Every seven-letter phone number corresponds to many different seven-letter words, but most of these words represent unrecognizable juxtapositions of letters. It's possible, however, that the owner of a barbershop would be pleased to know that the shop's telephone number, 424-7288, cor- responds to "HAIRCUT." A veterinarian with the phone number 738-2273 would be pleased to
15.7 (Telephone-Number Word Generator) 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 correspon- dence between digits and letters to develop seven-letter words that correspond to their phone num- bers. 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 cor- responds 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.c., "TAKEOUT"). Every seven-letter phone number corresponds to many different seven-letter words, but most of these words represent unrecognizable juxtapositions of letters. It's possible, however, that the owner of a barbershop would be pleased to know that the shop's telephone number, 424-7288, cor- responds to "HAIRCUT." A veterinarian with the phone number 738-2273 would be pleased to
C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter5: Repetition Statements
Section5.3: Interactive While Loops
Problem 6E: (Conversion) a. Write a C++ program to convert meters to feet. The program should request the...
Related questions
Question
Java
![15.7 (Telephone-Number Word Generator) 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 correspon-
dence between digits and letters to develop seven-letter words that correspond to their phone num-
bers. 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 cor-
responds 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 letters. It's possible, however, that the
owner of a barbershop would be pleased to know that the shop's telephone number, 424-7288, cor-
responds to "HAIRCUT." A veterinarian with the phone number 738-2273 would be pleased to](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F20524a65-d93c-47cb-bacb-a6696a50ab40%2F89104c5c-7865-4379-8be3-fd3e45813719%2Fcjmze5q_processed.png&w=3840&q=75)
Transcribed Image Text:15.7 (Telephone-Number Word Generator) 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 correspon-
dence between digits and letters to develop seven-letter words that correspond to their phone num-
bers. 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 cor-
responds 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 letters. It's possible, however, that the
owner of a barbershop would be pleased to know that the shop's telephone number, 424-7288, cor-
responds to "HAIRCUT." A veterinarian with the phone number 738-2273 would be pleased to
![Digit
2
3
4
Letters Digit
ABC
DEF
GHI
5
6
7
Letters Digit
JKL
ΜΝΟ
PRS
Making a Difference 651
9
Letters
TUV
W X Y
Fig. 15.19 | Telephone keypad digits and letters.
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."
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.](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F20524a65-d93c-47cb-bacb-a6696a50ab40%2F89104c5c-7865-4379-8be3-fd3e45813719%2Fomm05ob_processed.png&w=3840&q=75)
Transcribed Image Text:Digit
2
3
4
Letters Digit
ABC
DEF
GHI
5
6
7
Letters Digit
JKL
ΜΝΟ
PRS
Making a Difference 651
9
Letters
TUV
W X Y
Fig. 15.19 | Telephone keypad digits and letters.
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."
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.
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 5 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
![C++ for Engineers and Scientists](https://www.bartleby.com/isbn_cover_images/9781133187844/9781133187844_smallCoverImage.gif)
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
![C++ for Engineers and Scientists](https://www.bartleby.com/isbn_cover_images/9781133187844/9781133187844_smallCoverImage.gif)
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr