Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

NO ARRAYS CAN BE USED Therefore, write a Java class / program such that your source code will accomplish the following: Name of the class

NO ARRAYS CAN BE USED
Therefore, write a Java class/program such that your source code will accomplish the following:
Name of the class/program: A3_Q1.
Display a welcome/salutation message to the user of the program.
Display a prompt message for the user to enter a string/text for the cipher algorithm.
Preprocess the input string/text as described above; and compute the corresponding ciphertext based on your proposed encoded algorithm.
Additionally, note that: if an output ciphertext of an odd length ONLY is passed through our proposed algorithm and program, then the ciphertext shall be decoded to reveal the original/plain text.
Finally, display a complimentary-close message as follows: Thank you for your contribution to Concordia CSSE Drone Cipher Project.
The following are sample screenshots to illustrate the expected behavior of your program. Your program must display the same information, using the same format, depicted in the screenshots below.
Welcome to Concordia CSSE Drone Cipher Program:
Please enter your plain message below:
Keep right
Kindly find below your cipher message output: thgirKeep
Thank you for your contribution to Concordia CSSE Drone Cipher Project.
Figure 1. Sample-1 output of Question 1f
Welcome to Concordia CSSE Drone Cipher Program: +++++++++++++++++++++++++++++++++++++++++++++++++++
Please enter your plain message below:
Fundamentally, this algorithm computes the encoded information/text by pruning and preprocessing any given string/text to ensure that the first and last characters of the string/text is a non-space character; thereafter, it counts the number of characters in the string/text. If the preprocessed string/text is comprised of an even number of characters; then, the new encoded string will consist of the reverse of second half of the text, and the first half of the original text. If the preprocessed string/text is comprised of an odd number of characters; then, the new encoded string will be composed of (i) the reverse of second half of the string after the middle character, (ii) the middle character of original string, (iii) the reverse of the first half of the original string before the middle character. Please see Table 1 below for pictorial explanation.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle 12c SQL

Authors: Joan Casteel

3rd edition

1305251032, 978-1305251038

More Books

Students also viewed these Databases questions