please help me with the java codes for this problem i tried to do this program a week ago but even now i dont have an idea of how to go about with it. please help me it is urgent
Cryptography
Encryption (encoding) Given a message to send, we use the following table of letter to integer conversion to perform the encoding:
a, A=0 b, B=1 c, C=2 d, D=3 e, E=4 f, F=5 g, G=6 h, H=7 i, I=8 j, J=9 k, K=10 l, L=11 m, M=12
n, N=13 o, O=14 p, P=15 q, Q=16 r, R=17 s, S=18 t, T=19 u, U=20 v, V=21 w, W=22 x, X=23 y, Y=24 z, Z=25
And a key k(0<=k<=25).
Example suppose the key for shift cipher is k=11, and the message is we will meet at midnight.
We encode each letter of the message (non-letter characters are not encoded) by first converting it to an integer using the above table, adding the integer and obtain the remainder of the sum divided by 26. the letter to replace w is given by 22 +11=33%26=7. hence w is replaced by h or H
Decoding(decryption) to decode an encoded message. For each letter we use the table to get its corresponding integer, subtract 11 from the integer and obtain the remainder of the difference divided by 26. if the result is negative we add 26. the letter to replace h is given by7-k=7-11=-4%26. since it is negative, we add 26 to get 22 so h is replaced by w or W
The task is to write two programs:
1. the fist program will read the shift Cipher key from the key board and filename from the keyboard. The program will then encode the message in the file and write it to a file called “ encrypted.txt”.
2. the second program will also read the shift cipher from the keyboard. The program will then decode the message in the file and write it to a file called “decrypted.txt”. the program should the be used to decode the following encoded message:.
Zebzh irq qeb obxi pfqrxqflk
Kxqflk txo xdxfkpq kxqflk
Tebob afa fq xii ybddfk?
Tebk tfii fq bka?
Tbii, fq pbbjp: qlqxi abpqorzqflk qeb lkiv plirqflk
Xka qebob xfk q kl rpb: kl lkb zxk pqlm qebj klt.
Xfk’ q kl rpb: klylav zxk pqlm qebj klt