Create interface messageencoder with single abstract method


Problem:

Question 1: Create an interface MessageEncoder that has a single abstract method encode(plainText), where plainText is the message to be encoded. The method will return the encoded message.

Question 2: Create a class SubstitutionCipher that implements the interface MessageEncoder, as described above. The constructor should have one parameter called shift. Define the method encode so that each letter is shifted by the value in shift. Defne the method encode so that each letter is shifted by the value in shift. For example, if shift is 3, a will be replaced by d, b will be replaced by e, c will be replaced by f, and so on. (

Could someone help to explain the answer of these questions.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Create interface messageencoder with single abstract method
Reference No:- TGS0891811

Expected delivery within 24 Hours