JAVA Information Security: Principles ad Practices. Write a program to help an analyst decrypt a simple substitution cipher. Your program should take the ciphertext as input, compute letter frequency counts, and display these for the analyst. The program should then allow the analyst to guess a key and display the results of the corresponding \"decryption\" with the putative key. BELOW IS WHAT I GOT SO FAR. ANALYST IS NOT GUESSING A KEY OR PUTATIVE KEY IS NOT COMING OUT. IF YOU HAVE BETTER PROGRAM, PLEASE IGNORE THE SOURCE BELOW. THANKS. import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.Map; publicclass SubstitutionCipher { Map letterFrequencyMap; Map key; String ciphertext; String plaintext; BufferedReader br; privatevoid getCiphertext() // get cipher text as input from analyst { System.out.println(\"----- Substitution Cipher ----\"); System.out.println(\" Enter the cipher text: \"); br = new BufferedReader(new InputStreamReader(System.in)); try { ciphertext = br.readLine(); } catch(Exception e) { System.err.println(\"Exception in cipher text reading \" + e ); e.printStackTrace(); } ciphertext = ciphertext.toUpperCase(); System.out.println(\"The ciphertext Entered is - \" + ciphertext); } privatevoid displayLetterFrequency() { letterFrequencyMap = new LinkedHashMap(); for (int i = 0; i < ciphertext.length(); i++) { Character ch = ciphertext.charAt(i); if (!( ch >= \'A\' && ch <=\'Z\')) continue; // check if letter is not in between A to Z Integer cnt = (Integer) letterFrequencyMap.get(ch); if(cnt == null) { letterFrequencyMap.put(ch,1); } else { letterFrequencyMap.put(ch,cnt + 1); } } System.out.println(letterFrequencyMap); } privatevoid keyGuess() { System.out.println(\"Hey Analyst , Guess a key from a to z\"); String putativeKey = null; try { putativeKey = br.readLine(); } catch(Exception e) { System.out.println(\"Excpetion in reading the putative key\"); e.printStackTrace(); } createKeyMap(putativeKey); } privatevoid createKeyMap(String putativeKey) { if(putativeKey.length() < 26) { System.out.println(\"putative key length is less then 26 letters. Invalid Entry. \"); return; } key = new HashMap(); putativeKey = putativeKey.toUpperCase(); for(int j = 0;j Solution import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.Map; class SubstitutionCipher { Map letterFrequencyMap; Map key; String ciphertext; String plaintext; BufferedReader br; private void getCiphertext() // get cipher text as input from analyst { System.out.println(\"----- Substitution Cipher ----\"); System.out.println(\" Enter the cipher text: \"); br = new BufferedReader(new InputStreamReader(System.in)); try { ciphertext = br.readLine(); } catch(Exception e) { System.err.println(\"Exception in cipher text reading \" + e ); e.printStackTrace(); } ciphertext = ciphertext.toUpperCase(); System.out.println(\.