Question: In simple columnar transposition cipher, the plaintext is written horizontally onto a piece of graph paper with fixed width. The cipher text is then read
In simple columnar transposition cipher, the plaintext is written horizontally onto a piece of graph paper with fixed width. The cipher text is then read vertically. For example, the sentence of "THE WEATHER IS SO NICE THAT WE WANT TO PLAY" is written as the following using a graph paper width of six:

The resulting output from above would be: TTSTWPHHOHALEENANAWRITTYEICWTASEEO
Write a Java program given a string (all caps) and a positive integer width, outputs the cipher text. Refer to the sample output below.
Sample Run:
Enter the width size: 6
Enter the string: THE WEATHER IS SO NICE THAT WE WANT TO PLAY
Cipher Text: TTSTWPHHOHALEENANAWRITTYEICWTASEEO
Name the program: TransposeCipherXX.java, where xx are your initials.
ASEE E-CWT WRITTY EENANA HHOHAL TTSTWP
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
