Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write another method to decrypt the ciphertext into plain text. Hints Helpful skills and knowledge required to complete the practical problem are not limited to

Write another method to decrypt the ciphertext into plain text.
Hints
Helpful skills and knowledge required to complete the practical problem are not limited
to the followings:
2D array
Conditional if...elseor switch
Iteration loop foror whileor do...while
Critical thinking and problem solving skills
Submission requirements
Copy the source code into Word file.
Also zip your source code for submission to OAS.
All codes to be accompanied with proper comments, where necessary.
Provide screen shots and description of your inputs and outputs (e.g. tests using
different texts) for:
Encryption method
Decryption methodProgramming Practical
Suppose that you wish to setup a secure communication between you and your secret
team members. A simple encryption algorithm that generates ciphertext, which will
only be readable after decryption would be great!
Write a program that encrypts an input string using the following encryption algorithm:
(a)Create an array with size at least as big as the length of the plain string.
(b) For each cell of the array (left to right, row by row):
Fill with one character of the plain string at a time.
Replace blanks with asterisks (*).
(c)Fill the additional empty cell with full-stops(.).
(d) Finally, output the encrypted text by reading the array downward, column by
column.
Example:
Given plain text: "This is a secret text."
Firstly, decide on the number of columns. Suppose you choose 4.
Next, since the length of the text is 22,6 by 42-dimensional (2D) array is
reasonable ((6*4=24)). An example 2D-array is given as follows:
Output: T*ac*thi*t.issee.s*etx."
Program specifications
Construct Java program called Secret.
Your program would accept an input plain text, encrypt it, and print the cipher
output. Hints: Input can be accepted in any form, e.g. console, dialog box, files, or hard-coded.
Test your program with different plain texts and array column size to ensure error-
free.
Include comments to make your class is readable.
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

Step: 3

blur-text-image

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

Database Design Application Development And Administration

Authors: Michael V. Mannino

4th Edition

0615231047, 978-0615231044

More Books

Students also viewed these Databases questions

Question

4. Ignore small differences between scores.

Answered: 1 week ago

Question

1-4 How will MIS help my career?

Answered: 1 week ago