Question: Task 3 (10 pts.) The program task3.java given below is an incomplete program. The goal of the program is to take as input strings from

 Task 3 (10 pts.) The program task3.java given below is anincomplete program. The goal of the program is to take as inputstrings from the user, and then print out coded (encrypted) versions of

Task 3 (10 pts.) The program task3.java given below is an incomplete program. The goal of the program is to take as input strings from the user, and then print out coded (encrypted) versions of those strings, by replacing each letter with another letter. Complete that program, by defining a print_coded function, that satisfies the following specs: Function print_coded takes three arguments, called word, sources, targets. They are all strings. Functionprint_coded processes the letters of word one by one, in the order in which they appear in word. For every such letter X, the function processes X as follows: f X is equal to the character at position P of sources, then the function prints the character at position P of targets. o Otherwise, the function prints X Note that arguments sources and targets are hardcoded in the main function, the user cannot change those values. The user can only specify the value of word. IMPORTANT: you are NOT allowed to modify in any way the main function. This is an example run of the complete program Enter some word, or q to quit: hello ifmmp Enter some word, or q to quit: HELLO HELLO

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!