Help with Java assignment
Please see the .pdf for detailed assignment information.
The class Caesar inherits the abstract class Cipher. This class defines the methods code and decode. The method encode takes a String parameter and returns a String result. It takes each character of the parameter and performs a Caesar shift on the character. That is, a shift with possible wrap around can be coded as follows: char ch = word.charAt(i); ch = (char)(‘a’ + ch – ‘a’ + 3) % 26);
The method decode does the reverse. Listing 2 shows a partial definition of this class – Caesar