Question: JAVA program CIT 130 PROGRAM 3 SPRING 2021 My sample output (you do NOT have to duplicate exactly) Enter the filename: secret.txt How many lines

JAVA program CIT 130 PROGRAM 3 SPRING 2021 My sample output (youJAVA programdo NOT have to duplicate exactly) Enter the filename: secret.txt How many

CIT 130 PROGRAM 3 SPRING 2021 My sample output (you do NOT have to duplicate exactly) Enter the filename: secret.txt How many lines do you want to encrypt? 4 Enter your text: Francis Bacon was a politician during the reigns of Enter your text: Queen Elizabeth I and King James I. Thomas Jefferson Enter your text: said he was one of the three greatest men who Enter your text: ever lived. Enter 1 to encrypt a message Enter 2 to decrypt a file Enter any other number to exit 2 Enter the filename secret.txt FRANCIS BACONWASAPOLITICIANDURING THE REIGNS OF QUEEN ELIZABETHIANDKING JAMESI. THOMAS JEFFERSON SAID HE WAS ONE OF THE THREE GREATESTMENWH EVERLIVED. Enter 1 to encrypt a message Enter 2 to decrypt a file Enter any other number to exit 3 Contents of secret.txt ABBAB ABBAA BABAA AAAAA BAAAB AAAAA ABBBA ABBAB ABABA ABAAA BAABA AAABB BAABB BAAAA ABAAA ABBAA AABBA BAABA AABBB ABBAA BAAAB ABBAB BAABB BABBB BAABA BAAAB ABAAA. BAABA ABBB ABBAB ABABB AAAAA BAAAB BAAAA BAAAB ABBAB ABBAA BAAAB ABBAB ABBAA AABAB BAABA AABBB BAABA BABAA AABBB ABBAB . CIT 130 PROGRAM 3 SPRING 2021 For this assignment you will write a program that reads and writes to text files. Once you are able to read and write text files, add code to encode and decode messages using the Baconian cipher. This cipher was developed by English statesman and philosopher Francis Bacon. It works by replacing a letter with a sequence of five A's and/or B's. As documented in the above website, this is the table for encoding/decoding by the Baconian cipher. tr. a b 5 t t BABBA BABBB n Z i AABSA AAB35 A.BAAA BBBMA ABAAB ABABA AAAAS AAABA AAAB3 AABAA PARA ABABB ABBAR ABBAS ABBBA ABPB 3 BAAAB BAABA BAABB BBBAB BAPAA BARAB al e f V w k 1 r X c 0 Requirements: Create either a GUI or use a menu based application to enter the filename(s) and text to encrypt. Your application should allow the user to select to encrypt or decrypt as many messages as they like. Javadoc your class (your application) and all methods. In particular, I want you to use the following Javadoc tags: o @author @param @return o @throws c@version Code at least three methods (I used five) using the process of functional decomposition described in Chapter 5 of our text. Other Unicode characters are to be left as "plain text"; they are not encoded. Try coding encrypting text first, after reading and writing files Hints: I used the StringTokenizer class to decode my "secret message". Look at methods of the String class; these methods may be useful: o split (this is one of the preferred methods to break apart a String now rather than StringTokenizer - it places each separate "word" into an array, so if you aren't comfortable with arrays, I'd stick with StringTokenizer) o toUpperCase c substring cindexOf I also used StringBuffer which allows you to really append things to a "String-like" object. If you know how to manipulate arrays, feel free to use arrays. If you use arrays, you don't need to use the substring and indexOf methods of the String class. I also added a space(blank) after each encrypted character in the text file so I could use the StringTokenizer class. I converted everything to upper case (just for convenience). You don't have to use any of my hints if you can find another way to solve this problem. CIT 130 PROGRAM 3 SPRING 2021 My sample output (you do NOT have to duplicate exactly) Enter the filename: secret.txt How many lines do you want to encrypt? 4 Enter your text: Francis Bacon was a politician during the reigns of Enter your text: Queen Elizabeth I and King James I. Thomas Jefferson Enter your text: said he was one of the three greatest men who Enter your text: ever lived. Enter 1 to encrypt a message Enter 2 to decrypt a file Enter any other number to exit 2 Enter the filename secret.txt FRANCIS BACONWASAPOLITICIANDURING THE REIGNS OF QUEEN ELIZABETHIANDKING JAMESI. THOMAS JEFFERSON SAID HE WAS ONE OF THE THREE GREATESTMENWH EVERLIVED. Enter 1 to encrypt a message Enter 2 to decrypt a file Enter any other number to exit 3 Contents of secret.txt ABBAB ABBAA BABAA AAAAA BAAAB AAAAA ABBBA ABBAB ABABA ABAAA BAABA AAABB BAABB BAAAA ABAAA ABBAA AABBA BAABA AABBB ABBAA BAAAB ABBAB BAABB BABBB BAABA BAAAB ABAAA. BAABA ABBB ABBAB ABABB AAAAA BAAAB BAAAA BAAAB ABBAB ABBAA BAAAB ABBAB ABBAA AABAB BAABA AABBB BAABA BABAA AABBB ABBAB . CIT 130 PROGRAM 3 SPRING 2021 For this assignment you will write a program that reads and writes to text files. Once you are able to read and write text files, add code to encode and decode messages using the Baconian cipher. This cipher was developed by English statesman and philosopher Francis Bacon. It works by replacing a letter with a sequence of five A's and/or B's. As documented in the above website, this is the table for encoding/decoding by the Baconian cipher. tr. a b 5 t t BABBA BABBB n Z i AABSA AAB35 A.BAAA BBBMA ABAAB ABABA AAAAS AAABA AAAB3 AABAA PARA ABABB ABBAR ABBAS ABBBA ABPB 3 BAAAB BAABA BAABB BBBAB BAPAA BARAB al e f V w k 1 r X c 0 Requirements: Create either a GUI or use a menu based application to enter the filename(s) and text to encrypt. Your application should allow the user to select to encrypt or decrypt as many messages as they like. Javadoc your class (your application) and all methods. In particular, I want you to use the following Javadoc tags: o @author @param @return o @throws c@version Code at least three methods (I used five) using the process of functional decomposition described in Chapter 5 of our text. Other Unicode characters are to be left as "plain text"; they are not encoded. Try coding encrypting text first, after reading and writing files Hints: I used the StringTokenizer class to decode my "secret message". Look at methods of the String class; these methods may be useful: o split (this is one of the preferred methods to break apart a String now rather than StringTokenizer - it places each separate "word" into an array, so if you aren't comfortable with arrays, I'd stick with StringTokenizer) o toUpperCase c substring cindexOf I also used StringBuffer which allows you to really append things to a "String-like" object. If you know how to manipulate arrays, feel free to use arrays. If you use arrays, you don't need to use the substring and indexOf methods of the String class. I also added a space(blank) after each encrypted character in the text file so I could use the StringTokenizer class. I converted everything to upper case (just for convenience). You don't have to use any of my hints if you can find another way to solve this

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!