Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

JAVA CODE: A method readKey that takes a file name as an input– this file contai

ID: 3697802 • Letter: J

Question

JAVA CODE:

A method readKey that takes a file name as an input– this file contains: i) the letters that will be replaced separated by comma in the first line, and ii) the numbers that will replace each letter separated by comma in the second line. For simplicitly, assume that you can only get up to 10 characters and you can replace them with digits (0-9). This method should: i) verify that it contains the same number of letters and numbers, ii) that the numbers are not repeated, iii) that all the numbers are digits, and iv) handle file-reading errors via exceptions.

2. A method printKey that takes an array of the user-defined type (a.k.a. object) Letter and will print the text below. This method does not return any variable. Hint: use the method print in Letter.

File:

A,a,E,e,I,i,O,o,U,u 0,

1,2,3,4,5,6,7,8,9

Explanation / Answer

esle

if(c == 'E')

System.out.println(2);

else

if (c == 'e')

System.out.println(3);

else

if (c == 'I')

System.out.println(4);

else

if (c == 'i')

else

else

else

else

else

}

catch(Exception e)

{