Question: PLEASE DO THIS IN JAVA. THIS IS CHARACTER DECODING. Write a program that decrypts the output created by the program given by reversing the steps.

PLEASE DO THIS IN JAVA. THIS IS CHARACTER DECODING.

Write a program that decrypts the output created by the program given by reversing the steps. NOTE: you won't be able to recover whitespace, punctuation symbols or original case this way!

Example:

Given an input:

0x4C 0x50 0x53 0x53 0x50 0x49 0x50 0x41 0x56 0x48

step 1. Create a new list of values in the right order

0x4c 0x49 0x50 0x50 0x53 0x41 0x53 0x56 0x50 0x48

step 2. Shift four positions to the left (mod 26)

0x48 0x45 0x4c 0x4c 0x4f 0x57 0x4f 0x52 0x4c 0x44

Step 3. Convert back to characters using UTF-8 encoding

H E L L O W O R L D

PROGRAM-

import java.util.Scanner; public class Ass11 { static String removePunctuation(String str) { return str.replaceAll("\\W", ""); } static String removeWhiteSpace(String str) { return str.replaceAll("\\s", ""); } static String lowerCaseConverter(String str) { return str.toLowerCase(); } static String shift4Operation(String str) { String str2=""; int a; for(int i=0; i122) { int s = a - 123; a = 97 + s; } str2 = str2 + (char)a; } return str2; } static String upperCaseConverter(String str) { return str.toUpperCase(); } static String[] hexaConverter(String str) { int a; String[] str2 = new String[str.length()]; for(int i=0; i                                            

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!