please help me as i m new to java i want to write a java code for Caesar cipher.

the instuctions

This class h0as only class methods that encrypt and decrypt a String with a Key. The encryption and decrypting is done by using the encode and decode method for each letter of the string.

This class is used to represent a cryptographic key of a substitution cipher.
The mechanics of this simple cipher is that letters of the alphabet will be replaced by another letter of the alphabet. For example an original 'a' will encoded in a 'q', a 'b' will be encoded in an 'a', a 'c' will be encoded in a 'z' and so on.
A key of this cipher consists of a number which indicates by how many letters the input should be shifted. This number should be between 0 and 25. Example: input is 5.



In this example the letter 'a' will be encoded by an 'f'. Upper case letter follow the same principle. So in this example the letter 'R' will be encoded by an 'W'. The decoding is the reverse of the encoding. In this example the 'f' will be decoded to the letter 'a'.
For numbers, the same method is applied. If the key is larger than 9, the encoding should work with the input modulo 10! Example: input is 13, we calculate 13 modulo 10 = 3.
0 1 2 3 4 5 6 7 8 9
3 4 5 6 7 8 9 0 1 2

please i have no idea how to start.

3 Years
Discussion Span
Last Post by stultuske

this is not a "code on demand" forum.
the caesar cipher is very easy to code in Java.

how about first giving it a try, and then if it doesn't work, show us what you've done, and explaining where it goes wrong.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.