Question: [JAVA] I need help coding the methods at the bottom of the page, using this cipher algorithm. Encryption is an important consideration when transmitting information

[JAVA] I need help coding the methods at the bottom of the page, using this cipher algorithm.

[JAVA] I need help coding the methods at the bottom of thepage, using this cipher algorithm. Encryption is an important consideration when transmittinginformation over insecure mediums. One of the ways that this has been

Encryption is an important consideration when transmitting information over insecure mediums. One of the ways that this has been done historically is with the use of a cipher. This assignment details making a custom cipher called the 'Western Cipher', and you will be tasked with implementing the encoding and decoding algorithm, alongside using a Circular Array Queue as described in class. This cipher will be used to encode messages strictly consisting of upper case alphabetical characters (i.e., A-Z, no numbers, punctuation, etc) and spaces, i.e., The custom cipher we are implementing has the following rules: 1. All letters are always shifted forwards 5 steps in the alphabet. For example, A would be shifted forward to 'F', and 'B' would be shifted to 'G'. 2. All letters are shifted an additional 2 steps forward for every spot in the length of the message they are, starting with an index of 0. So, for example, the 'AB' from above would be shifted to 'Fl'. 3. All values listed below are replaced with the following values according to the table: A 1 E 2 1 3 o 4 U 5 Y 6 This means that 'AB' would now become '11' This takes priority over the previous rules for the individual letter substituted, so there is no shift in the alphabet before the conversion. Letters shifted to become values in table 3 should not be converted to numbers. 4. If the previous letter was converted to a numerical value, the letter that follows should be shifted backwards by twice the amount that the letter was converted to. So, for example, AB' becomes first '1B', and then B is shifted forward 5 steps from rule 1, 2 steps from rule 2, and then 2 backwards by this rule, 4. So the encoded message would now be '16 5. If the previous letter was converted to a numerical value, and the next value is also to be converted to a numerical value, use the following table for encryption instead of following rule 4: E 1 O U Y 3 4 5 6 1 2 So 'AA' would become '13', 'AE' would become '14', and 'YA' would become '63'. 'YOU' would become '661'. These are the rules your cipher must follow. We recommend writing out pseudocode for this process, as the listed order from 1-5 may not be the ideal one from which to convert this into an algorithm. For the second part of the assignment, you must also implement a decoder method which takes an encoded string and returns it to it's original form. This should undo all of the operations above in the appropriate order such that a message can be encoded and decoded without any loss of information or mistakes, i.e., 'AA' becomes '12' and '12' becomes 'AA' again. encode(String input) Takes a string as input, splits the string into individual characters, applies the Western Cipher algorithm described above, rejoins the individual characters into a string and returns it. While possible to implement without a queue, this method must enqueue every character into the queue and then encode while dequeueing. decode(String input) Takes a string as input, splits the string into individual characters and undoes the Western Cipher algorithm described above. It then rejoins the individual decoded characters, gathers them into a string and returns it. While possible to implement without a queue, this method must enqueue every character into the queue and then decode while dequeueing. Main method This requirement is not assessed in the tests. The main method must prompt the user about whether it would like to encode or decode a string, take the string and encode/decode as appropriate, and then prompt the user if they would like to enter another string. If no is selected, the program should exit. Encryption is an important consideration when transmitting information over insecure mediums. One of the ways that this has been done historically is with the use of a cipher. This assignment details making a custom cipher called the 'Western Cipher', and you will be tasked with implementing the encoding and decoding algorithm, alongside using a Circular Array Queue as described in class. This cipher will be used to encode messages strictly consisting of upper case alphabetical characters (i.e., A-Z, no numbers, punctuation, etc) and spaces, i.e., The custom cipher we are implementing has the following rules: 1. All letters are always shifted forwards 5 steps in the alphabet. For example, A would be shifted forward to 'F', and 'B' would be shifted to 'G'. 2. All letters are shifted an additional 2 steps forward for every spot in the length of the message they are, starting with an index of 0. So, for example, the 'AB' from above would be shifted to 'Fl'. 3. All values listed below are replaced with the following values according to the table: A 1 E 2 1 3 o 4 U 5 Y 6 This means that 'AB' would now become '11' This takes priority over the previous rules for the individual letter substituted, so there is no shift in the alphabet before the conversion. Letters shifted to become values in table 3 should not be converted to numbers. 4. If the previous letter was converted to a numerical value, the letter that follows should be shifted backwards by twice the amount that the letter was converted to. So, for example, AB' becomes first '1B', and then B is shifted forward 5 steps from rule 1, 2 steps from rule 2, and then 2 backwards by this rule, 4. So the encoded message would now be '16 5. If the previous letter was converted to a numerical value, and the next value is also to be converted to a numerical value, use the following table for encryption instead of following rule 4: E 1 O U Y 3 4 5 6 1 2 So 'AA' would become '13', 'AE' would become '14', and 'YA' would become '63'. 'YOU' would become '661'. These are the rules your cipher must follow. We recommend writing out pseudocode for this process, as the listed order from 1-5 may not be the ideal one from which to convert this into an algorithm. For the second part of the assignment, you must also implement a decoder method which takes an encoded string and returns it to it's original form. This should undo all of the operations above in the appropriate order such that a message can be encoded and decoded without any loss of information or mistakes, i.e., 'AA' becomes '12' and '12' becomes 'AA' again. encode(String input) Takes a string as input, splits the string into individual characters, applies the Western Cipher algorithm described above, rejoins the individual characters into a string and returns it. While possible to implement without a queue, this method must enqueue every character into the queue and then encode while dequeueing. decode(String input) Takes a string as input, splits the string into individual characters and undoes the Western Cipher algorithm described above. It then rejoins the individual decoded characters, gathers them into a string and returns it. While possible to implement without a queue, this method must enqueue every character into the queue and then decode while dequeueing. Main method This requirement is not assessed in the tests. The main method must prompt the user about whether it would like to encode or decode a string, take the string and encode/decode as appropriate, and then prompt the user if they would like to enter another string. If no is selected, the program should exit

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!