Part 1: Create an interface MessageEncoder that hasencode(plainText), where plainText is the message to be encoded.The method (when Implemented) will return the encoded message.
Part 2: Create a class SubstitutionCipher that implements theinterface MessageEncoder. The constructor should have one parametercalled shift. Define the method encode so that each letter isshifted by the value in shift. For example, if shift is 3,a will be replaced by d, b will bereplaced by e, c will be replaced by f,and so on. Hint: You may wish to define a private methodthat shifts a single character.
Part 3: Create a class ShuffleCipher that implements theinterface MessageEncoder,
OR
OR