Hay guys ...I am trying to shift any word or character by fixed shifter but I really dont know how to append the each shifted character i mean encrypted character...Anyhelp will be appreciated. My doCipher() just returns the last encoded charcter not all the other letters. I assume it do encrypt all but only shows the last. JUst need to work on doCipher() for now...Thank you guys... /******** * Cipher class - * A class that is used to implement the Caesar cipher. * * @author song * */ public class Cipher { String plainText; /******* * Constructor for a Cipher object * @param plainText the document text as a String. We copy * the param (for protection), and lower case it. */ public Cipher(String plainText) { this.plainText = plainText.toLowerCase(); } /************** * Returns the encrypted plainText, with 'a' being the value of shift * @param shift The character to use in place of 'a'. Must be in the range * 'a' .. 'z', or we throw an exception. * @return the encrypted plainText as a String */ public String doCipher(char shift) { String cipherText= null; if (shift < 'a' || shift > 'z') { throw new IllegalArgumentException("shift amount must be between lowercase a and z"); } int newShift = shift -'a'; for (int i=0; i < plainText.length(); i++) { char decode = (char)(plainText.charAt(i) + newShift); char[] done = {decode}; cipherText= new String(done); } return cipherText; } /*************** * Returns the encrypted plainText, with 'a' being shift + 1 (right-shifted) * @param shift The character before the one to use in place of 'a' * @return the encrypted plainText as a String */ public String nextCipher(char shift) { // TODO: Complete me! return null; } /************** * Returns the encrypted plainText, with 'a' being shift - 1 (left-shifted) * @param shift The character after the one to use in place of 'a' * @return the encrypted plainText as a String */ public String prevCipher(char shift) { // TODO: Complete me! return null; } }**