Question: Please write the following code in either C or Java and please explain the process of using the encryption file. Your program must read in
Please write the following code in either C or Java and please explain the process of using the encryption file.


Your program must read in an input plaintext file that may contain uppercase letters, lowercase letters and non-letter characters. Your program must distinguish between these three groups so that only the letters get encrypted. All non-letter characters in the file are simply skipped and not counted as part of the plaintext. Please note that although both upper case and lower case letters will be encrypted. Your program should convert an upper case input letter to the corresponding lower case letter, i.e., it should convert an 'A' to an 'a'. One possible breakdown to solve this problem is as follows: 1) Write a section of code or function that reads only the upper and lower case letters in the input file into an char array of size 512, storing only the appropriate lowercase letters in the character array. 2) Write a section of code or function that takes as input the array from section 1 and the encryption key and produces an array of ciphertext storing only lowercase letters. 3) Write a section of code or function that takes as input the array storing the ciphertext and outputs it to the screen in the format specified. Additional functions or code will be needed to echo the input key and plaintext files. Sample Key File1 "I think and think for months and years. Ninety-nine times, the conclusion is false. The hundredth time I am right." - Albert Einstein "Imagination is more important than knowledge. For knowledge is limited, whereas imagination embraces the entire world, stimulating progress, giving birth to evolution." Albert Einstein Sample Plaintext File2 "Fall in love with some activity, and do it! Nobody ever figures out what life is all about, and it doesn't matter. Explore the world. Nearly everything is really interesting if you go into it deeply enough. Work as hard and as much as you want to on the things you like to do the best. Don't think about what you want to be, but what you want to do. Keep up kind of a minimum with other things so that society doesn't stop you from doing anything at all." - Richard Feynman some Corresponding Encrypted Output File ntstvxlbyxdqgrxcdqopmpnigbyrdugvbasumagrzxzrmynyiuchvhbsbzvnwnsldptisbnnqumwwvxa zxuafkmxlqpwpvvmlmjgkplammrrgrvxzmgpazuzwzqpzcriamxyefdvbctjbuylczxgceehhkttqpva czlzkyorwhszpatinsfcqueezfuyefmassampvxdwervqhcxcvemwquiyshvwlvuvobuoosruvnhacoe shcknneussxfcgoaeblwndiadtbghrmrzzdjaardpfdbiyqieazczabruwglxzflagnwucgjlnkwqvml ddzwwgawaicbfyikvflamvgmegzobnrbxrepzvuaezqnqytunnqflkfpjlobfjmloqxkqqexkhkltiba dbclohkltibadbfpifjfqbatebobxpfjxdfkxqflkbjyoxzbpqebbkqfobtloiapqfjrixqfkdmoldob ppdfsfkdyfoqeqlbslirqflkxiyboqbf Your program must read in an input plaintext file that may contain uppercase letters, lowercase letters and non-letter characters. Your program must distinguish between these three groups so that only the letters get encrypted. All non-letter characters in the file are simply skipped and not counted as part of the plaintext. Please note that although both upper case and lower case letters will be encrypted. Your program should convert an upper case input letter to the corresponding lower case letter, i.e., it should convert an 'A' to an 'a'. One possible breakdown to solve this problem is as follows: 1) Write a section of code or function that reads only the upper and lower case letters in the input file into an char array of size 512, storing only the appropriate lowercase letters in the character array. 2) Write a section of code or function that takes as input the array from section 1 and the encryption key and produces an array of ciphertext storing only lowercase letters. 3) Write a section of code or function that takes as input the array storing the ciphertext and outputs it to the screen in the format specified. Additional functions or code will be needed to echo the input key and plaintext files. Sample Key File1 "I think and think for months and years. Ninety-nine times, the conclusion is false. The hundredth time I am right." - Albert Einstein "Imagination is more important than knowledge. For knowledge is limited, whereas imagination embraces the entire world, stimulating progress, giving birth to evolution." Albert Einstein Sample Plaintext File2 "Fall in love with some activity, and do it! Nobody ever figures out what life is all about, and it doesn't matter. Explore the world. Nearly everything is really interesting if you go into it deeply enough. Work as hard and as much as you want to on the things you like to do the best. Don't think about what you want to be, but what you want to do. Keep up kind of a minimum with other things so that society doesn't stop you from doing anything at all." - Richard Feynman some Corresponding Encrypted Output File ntstvxlbyxdqgrxcdqopmpnigbyrdugvbasumagrzxzrmynyiuchvhbsbzvnwnsldptisbnnqumwwvxa zxuafkmxlqpwpvvmlmjgkplammrrgrvxzmgpazuzwzqpzcriamxyefdvbctjbuylczxgceehhkttqpva czlzkyorwhszpatinsfcqueezfuyefmassampvxdwervqhcxcvemwquiyshvwlvuvobuoosruvnhacoe shcknneussxfcgoaeblwndiadtbghrmrzzdjaardpfdbiyqieazczabruwglxzflagnwucgjlnkwqvml ddzwwgawaicbfyikvflamvgmegzobnrbxrepzvuaezqnqytunnqflkfpjlobfjmloqxkqqexkhkltiba dbclohkltibadbfpifjfqbatebobxpfjxdfkxqflkbjyoxzbpqebbkqfobtloiapqfjrixqfkdmoldob ppdfsfkdyfoqeqlbslirqflkxiyboqbf
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
