subject

Your program will demonstrate use of arrays, searching an array, using methods, passing parameters by reference, returning values from a method, loops, user input, and user display. For this assignment, you will be creating your own secret code program. Using two arrays, you will initialize one with the lower case alphabet, the other array will consist of a set of alternate symbols or letters, that will form a replacement cipher. The program will start with displaying a description of the program and instructions for the user. Then the user will enter a sentence. The program will then replace each letter with the alternate symbol or letter with the corresponding subscript in the second array (you may treat spaces as a "space" or choose to code the space). The program should then allow the user to enter a "secret code" and translate it back to the original English sentence. The program will use a method that receives the array name and returns the value of the subscript. This value is then used to retrieve the alternative symbol or letter. This method is used for both coding and decoding. The example at the end of these instructions provides a sample display of a cipher program. For this example simple numbers corresponding to their position in the alphabet will be used as the cipher. Your secret code may not use the simple number code in the example, it should use a unique approach that cannot be easily translated without the program.
You will submit your program files and execution screenshots demonstrating all the functionality of the program with at least two examples each of coding and decoding. Remember that your code must be executable. Remember to review the rubric to ensure you have met all the program grading requirements to maximize your grade.
SAMPLE OUTPUT:
This program will translate your input into a secret code. It can also translate your secret code back into English for the receiver. When prompted, enter your input and the program will provide the code or accompanying translation.
Do you want to code or decode? Enter 1 for code or 2 for decode
1
Enter your sentence all in lowercase with no punctuation:
when will the semester start
Your message is:
22 7 4 13 22 8 11 11 19 7 4 18 4 12 4 18 19 4 17 18 19 0 17 19
Do you want to code or decode? Enter 1 for code or 2 for decode
2
Enter your sentence all in secret code with no punctuation:
7 4 11 11 14
Your message is:
hello

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 08:10
Alook-up table used to convert pixel values to output values on a monitor. essentially, all pixels with a value of 190 or above are shown as white (i.e. 255), and all values with a value of 63 or less are shown as black (i.e. 0). in between the pixels are scaled so that a pixel with a value p is converted to a pixel of value 2/127 βˆ’+3969). if a pixel has a value of 170 originally, what value will be used to display the pixel on the monitor? if a value of 110 is used to display the pixel on the monitor, what was the original value of the pixel?
Answers: 1
question
Computers and Technology, 23.06.2019 13:50
Explain how email technologies enable the exchange of messages between users. find out the typical parts of an email address and explain each part.
Answers: 1
question
Computers and Technology, 23.06.2019 15:20
In a game with three frames, where will the objects on layer 1 appear? a. next to the play area b. in the middle of the game c. behind everything else d. in front of everything else
Answers: 1
question
Computers and Technology, 24.06.2019 00:30
Which boolean operator enables you to exclude a search term? a} not b} and c} or d} plus
Answers: 1
You know the right answer?
Your program will demonstrate use of arrays, searching an array, using methods, passing parameters b...
Questions
question
Mathematics, 04.11.2021 15:50
question
Chemistry, 04.11.2021 15:50
question
Mathematics, 04.11.2021 16:00
Questions on the website: 13722367