Your program should take a string that has been encoded


Your program should take a string that has been encoded using a "secret" code, and decode it. The code works as follows:

Each letter is decoded using the letter immediately preceding it in the alphabet. "b" becomes "a", "c" becomes "b", etc.

The letter "a" becomes "z".

Each digit is decoded using the preceding digit. "1" becomes "0", "2" becomes "1", etc.

The digit "0" becomes "9".

Characters that are neither letters nor digits are unchanged.

Regardless of whether the input string contains upper- or lowercase characters, the output (one string) should be in all lowercase.

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Your program should take a string that has been encoded
Reference No:- TGS02393444

Now Priced at $10 (50% Discount)

Recommended (92%)

Rated (4.4/5)