Question: USE JAVA only, please. Thank you. Note: The encrypt() method of MorseCipher should be relatively short (20ish lines) and be fairly easy to follow. Commenting

USE JAVA only, please. Thank you.USE JAVA only, please. Thank you. Note: The encrypt() method of MorseCiphershould be relatively short (20ish lines) and be fairly easy to follow.Commenting is a must, as always. The decrypt() method is trickier. Itinvolves some significant looping, conditionals, and cleverness, or extra familiarity with the

Note: The encrypt() method of MorseCipher should be relatively short (20ish lines) and be fairly easy to follow. Commenting is a must, as always.

The decrypt() method is trickier. It involves some significant looping, conditionals, and cleverness, or extra familiarity with the String class. Make your code as clean as possible and include comments to describe your approach in each section. Line by line descriptions are not needed, but comments like "find the character that matches the code", "check whether code is finished" and "advance past spaces" help a reader to discern what each portion is doing. Show off your communication skills - much of writing code is actually about communicating to the next programmer, not to the computer!

Test cases to pass: https://repl.it/@tom_don/CuteFaroffDirectories

class MorseCipher Morse code is actually a cipher with encryption and decryption actions. Unusually, the intent is not to hide information, merely to represent it in a form more suited for transit. By representing letters with dashes and dots, it is easy to transmit data through lossy environments such as transmission across wires The project pack contains a start for MorseCipher.java which defines the alphabet we will use along with the Morse codes associated with the those letters You will implement the same encrypt() and decrypt() methods as before. Other than the series of dots and dashes representing each letter, we see three spaces separating each letter of a word and seven spaces separating words. There are no spaces at the end of the message. We must create exactly the correct amount of spacing in our encrypted messages, and we must correctly extract the letters and spaces when decrypting Fields Due to the possibility of transcription errors, these two definitions are provided directly (and in the provided files) public static final string lettersABCDEFGHIJKLMNOPORSTUVWXYZ1234567890"; public static final Stringcodes1 " " , /*H T *

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!