Question
On the dial pad of most phones, a number (from 1 to 9) is associated with some English letters. This sometimes allows one to translate
On the dial pad of most phones, a number (from 1 to 9) is associated with some English letters. This sometimes allows one to translate a phone number into an English word. In this programming task, we consider translating only the last 4 digits of a phone number. For example, the number 7892253 can be translated to 789ABLE. The attached file contains a list of common words with 4 letters. You are to write a program that asks the user to enter a 7-digit number (assuming it is a valid phone number). If it is possible to translate the last 4 digits of the phone number to a word in the list, then the program will print the translation of the phone number (such as 789ABLE). If this is not possible, the program will print a message \"Translation failed\".
Submit in a PDF file the code and the its execution results using 6 test cases (3 successful cases and 3 failed cases).
(File didnt upload because its a text file but its a long list of 4 letter words called \"EnglishWords4Letters.txt\")
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started