Cipher Class
Create a class for the cipher with the following methods:
default constructor: This constructor does nothing.
constructor with two parms (key and list of rotation counts): Each parm is a string; the key is a string of 26 lowercase letters and the rotation counts is a string of 26 digits. The key should be converted to an indexed list of Characters and the rotation counts should be converted to an indexed list of Integers.
encode: The encode method has one parm -- the plaintext string, and it returns the ciphertext string. Make a copy of the list that holds the key so that the original is not changed during encoding, because it will be needed for other calls to encode and decode. All non-letters, including blanks, should be left unchanged by the encode method. After you get your encode method working for lower case letters, make it work for uppercase letters too.
decode: The decode method has one parm -- the ciphertext string, and it returns the plaintext string. To decode, start with the original key and counts, and perform the same rotations as when encoding.
RefIndexedList
You will write a shcopy method for the RefIndexedList. The shcopy method has no parms and returns a RefIndexedList. The shcopy method will make a shallow copy of the list; this means that the method will create new LLNodes to point to the list elements, but it will not create copies of the list elements. Thus the original list and the clone will point to the same objects.
useCipher Class
Your main method should do the following:
read the key and rotation counts from a file; the first line should contain the key as a string of 26 lowercase letters and the second line should contain the rotation counts as a string of 26 digits
create a cipher using this key and rotation count
create a loop that prompts the user to enter a string (the plaintext); encode the plaintext and print the ciphertext, then decode the ciphertext and print the plaintext
keep prompting the user to enter a string until the user wants to exit
Any one willing to help me get through this assignment? I'm not asking for solutions, just help. anyone?