Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assignment: Top Secret Encoder Create a secret encoder and decoder program. The program should function as follows: Begin by presenting a menu of options to

image text in transcribed

Assignment: Top Secret Encoder Create a secret encoder and decoder program. The program should function as follows: Begin by presenting a menu of options to the user. The user should be able to elect to encode a message, decode a message or quit. Repeatedly prompt the user with these options and end the program when the user elects to quit. User Interface: Top Secret word Encrypt / Decrypt Enter an option: (1) to encrypt a word (2) to decrypt a word (O) to exit Option: Input: The user should only enter lowercase letters without any spaces. If the user enters an invalid string (i.e. "bob123"), they should be notified that this is an invalid string and be re-prompted for a new string. Hint: A method would be useful to handle this validation as you'll need to the same thing in the next step. Encryption Key: This key will also be a String of lowercase characters without any spaces. Make sure the encryption key is valid before continuing. The encryption key is used to encode/decode the word. It is used to create a "shift index" (i.e. every character is shifted characters to the right). For example and encryption key of "ab" would shift the characters by 3 (a + b = 1+2 = 3) Here's an example of how your shift index should work: // original alphabet a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,4,7,8,1,U,V,W,X,Y, 2 // Shift Index - 1 2, a, b, c, d, e, f,g, h, i, j, k, l, m, n,o,,q, r, s, t, u,v,w,x,y // Shift Index - 2 7,2, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p,q, r, s, t, u,v,w

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

OCA Oracle Database SQL Exam Guide Exam 1Z0-071

Authors: Steve O'Hearn

1st Edition

1259585492, 978-1259585494

More Books

Students also viewed these Databases questions

Question

Why is the System Build Process an iterative process?

Answered: 1 week ago