java programming 54

This is an exercise in using String methods and also casting a char to get an int, and an int to get a char.

Hint: if you cast a char to an int you get its ASCII value. Add or subtract from this ASCII value you get another ASCII value, which you can cast as a char and get its character equivalent.

For this program assume you work for a security company that encodes its messages very simply by taking each character and adding 3, so A will be D, r will be u etc. Your job is to write a program to decode messages. For now, you only have the ability to decode a single line of code, and for the purposes of this homework I will make it a 6 letter word. Your input will be from the keyboard and will be a single 6 letter word that is in code. Your program must output the original (uncoded) word.

Sample input: Khoor$ should output Hello!

Prqgd| should output Monday
h{fxvh should output excuse

Solution:

15% off for this assignment.

Our Prices Start at $11.99. As Our First Client, Use Coupon Code GET15 to claim 15% Discount This Month!!