Question: Question 1 (50 points): Alphabetic Telephone Number Translator (JAVA) For this assignment question, write a program which will get the personal alphabetic telephone numbers from

Question 1 (50 points): Alphabetic Telephone Number Translator (JAVA)

For this assignment question, write a program which will get the personal alphabetic telephone numbers from a text file and store them in an array list called alphabeticPhoneNumbers. If the number of the characters is not between 12 and 14, inclusively and there is any other character besides a-z or A-Z, or -, or 0-9 in a record, those should be flagged as ill-defined data. This ill-defined data needs to remove from the original array list and move it to another array list called errorProneNumbers. In other words, error involving records should be saved in a separate array list. If there no error in the data, it needs to be translated to its numeric equivalent to store it in another array list that is called equivalentPhoneNumber.

At the end application should display the array list that has the telephone number with alphabetic characters, and the list that has their numeric equivalent, and the list that has data (alphabetic phone number) with error.

For example, when the program reads 555-GET-FOOD from the original list, its equivalent 555-438-3663 needs to be stored into the list equivalentPhoneNumber. When it reads 222-ASK-???? from the original list, this error prone data needs to move to the list errorProneNumbers.

On a standard telephone, the alphabetic letters are mapped to numbers in the following fashion;

A, B and C = 2

D, E, and F = 3

G, H, and I = 4

J, K, and L = 5

M, N, and O = 6

P, Q, R, and S = 7

T, U, and V = 8

W, X, Y, and Z = 9

Use Java

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!