To make telephone number easier to remember, some companies useletters to show t
ID: 3614463 • Letter: T
Question
To make telephone number easier to remember, some companies useletters to show their telephone number. For example, the telephonenumber 438-5626 can be shown as GET-LOAN. In some cases, to make atelephone number meaningful, companies might use more than sevenletters. For example, 225-5466 can be displayed as CALL-HOME, whichuses eight letters. Write a program that prompts the user to entera telephone number expressed in letters and outputs thecorresponding telephone numbers in digits.If the user enters morethan eight letters, then process only the first seven letters.Also, output the-(hyphen) after the third digit. Allow the user touse uppercase and lowercase letters, as well as spaces betweenwords. Moreover, your program should process as many telephonenumbers as the user wants.(Hint: You can read the entered telephone number as a string andthen use the charAt method of the class String toextract each character. For example, if str refersto a string, then the expression str.charAt (i)returns the character at the ith position. Recall that ina string, the position of the first character is 0.)