Question: Write a Java program to read a string from the user and output the encrypted message using the alternation columns approach. Your tasks are 1)

 Write a Java program to read a string from the user

Write a Java program to read a string from the user and output the encrypted message using the alternation columns approach. Your tasks are 1) Read the string 2) Remove the spaces from the string 3) Convert all the characters to upper case 4) Create a character grid based upon the length of the message. The number of columns (the length of the row should be the square root of the length of the message rounded up.) The number of rows should be the length of the message divided by the number of columns rounded up.. For example, if the message was 30, Then the number of columns is 6 and the number of rows is 5. 5) Fill in the grid with message. If the message is too short pad it with the letter "X" to make it fit. 6) Create the encrypted string by copying the columns in alternating order. Grading Criteria Points Criteria 1 Read the Message 2 Prepare the message 4 Create and fill the grid 4 Encrypt the message 1 Display the message Documentation 4 Make certain to use the JavaDoc standard and include tags for the author, @version for the program and @param @return for every method. Each file should have its own comment block and every method should have its own comment block and be less than 25 lines. Sample 1 Enter message: England expects that every man will do his duty ENGLANDEXPECTSTHATEVERYMANWILLDOHISDUTY nRows 6 Cols 7 ENGLAND EXPECTS THATEVE RYMANWI LLDOHIS DUTYXXX Encrypted: EETRLD ULYHXN GPAMDT YOATEL ACENHX XIWVTN DSEISX

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!