Create a class SubstitutionCipher that implements the interface MessageEncoder, as described in the previous exercise. The constructor should have one parameter called shift. Define 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. Hint: You may wish to define a private method that shifts a single character.
What will be an ideal response?
See the code in SubstitutionCipher.java.
Computer Science & Information Technology
You might also like to view...
________ formats a control based on one or more comparisons to a set rule set
A) The Property Sheet B) Field formatting C) Conditional formatting D) Control formatting
Computer Science & Information Technology
A small business owner has asked the security consultant to suggest an inexpensive means to deter physical intrusions at their place of business. Which of the following would BEST meet their request?
A. Fake cameras B. Proximity readers C. Infrared cameras D. Security guards
Computer Science & Information Technology