Question: Design and implement a Java program for programming exercise 6.21, page 239 (name it PhoneKeypad), to display a given phone number with letters in all
Design and implement a Java program for programming exercise 6.21, page 239 (name it PhoneKeypad), to display a given phone number with letters in all number format. Sample output is shown in the textbook. Follow the instructions in the problem statement. Design the test program main method to handle all input and output and to allow the user to re-run the program with different inputs (i.e., use a loop structure). Document your code and follow the model outputs in the textbook. (Note: Various formal and informal national and international formats for displaying telephone numbers include a plus sign for indicating the presence of a country code, spaces, parentheses, dashes, periods, etc. and the length of the telephone number can vary widely. The program must be able to process phone numbers of any length with any character which can be entered using a standard keyboard if the entered number contains a character that is neither a letter nor a digit, treat it is a legitimate phone number display character.)

*6.21 (Phone keypads) The international standard letterumber mapping for telephones is shown in Programming Exercise 4.15. Write a method that returns a number, given an uppercase letter, as follows int getNumber(char uppercaseLetter) Write a test program that prompts the user to enter a phone number as a string. The input number may contain letters. The program translates a letter (uppercase or lowercase) to a digit and leaves all other characters intact. Here is a sample run of the program: Enter a string: 1-800-Flowers 1-800-3569377 Enter a string: 1800flowers 18003569377
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
