Question: in this question you will write a method that takes an input String and returns its encrypted version as a new String . public static
in this question you will write a method that takes an input String and returns its encrypted version as a new String .
public static String encrypt (String is)
. The implementation of encoding scheme should be as follows: "WE LOVE ROSEJAC A LOT" then you will embed the String in a zig-zag pattern as shown below .The number of rows in the zig-zag pattern is exactly 3.
w +++V+++S+++C+++T
+E+O+E+O+E+A+A+O+
++L+++R+++J+++L++
then your method should read the characters row-by-row and return following encrypted String : WVSCTEOEOEAAOLRJL
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
