Modify the Encryption program so that it uses the following encryption algorithm: Every letter (both uppercase and...

60.1K

Verified Solution

Question

Programming

  1. Modify the Encryption program so that it uses thefollowing encryption algorithm:

    • Every letter (both uppercase and lowercase) converted toits successor except z and Z, which are converted to 'a' and 'A'respectively (i.e., a to b, b to c, …, y to z, z to a, A to B, B toC, …, Y to Z, Z to A)

    • Every digit converted to its predecessor except 0, whichis converted to 9 (i.e., 9 to 8, 8 to 7, … 1 to 0, 0 to9)

    • Everything else unchanged.

Hand in:

Encryption.java

Note:

You must modify the specifications (API) of the methodsinvolved as well.  

Answer & Explanation Solved by verified expert
4.1 Ratings (635 Votes)
Thanks for the question It would have good if you have shared the previous code that needed to be modified nevertheless I have written the method that takes in a plain text and encrypt into based on the logic asked in the quesitonHere is the codeimport javautilScannerpublic class Encryption    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students