// Complete this method so that it returns the encrypted character for
// Complete this method so that it returns the encrypted character for
// theChar when and offset of theOffset is used
// theChar when and offset of theOffset is used
// So if theChar='m' and theOffset is 3 the method will return 'p'
// So if theChar='m' and theOffset is 3 the method will return 'p'
// Lower case characters remain lower case, upper case remain upper case
// Lower case characters remain lower case, upper case remain upper case
// Any other characters are returned unchanged
// Any other characters are returned unchanged
char[]alphabet={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};// creates an array which has each letter of the alphabet
return'a';
intletterPlace=0;//creates an int and the value is 0
}
theChar=Character.toLowerCase(theChar);//makes theChar equal to the lowercase value of theChar
// Complete this method so that it uses encryptedCharacter to
// return the encrypted version of theMessage using theOffset
Stringoutput="";
for(charletter:theMessage.toCharArray())//creates a 'for' loop that iterates the char "letter" through theMessage.tochararray
{
output=output+letter;
letter=enryptedCharacter(letter,theOffset);// makes letter equal to the amount which has been obtained while running theMessgae through the encrypted character method above