Old fashion Morse code uses a series of dots and dashes to stand for letters, digits and punctuation marks. This program will allow a user the option to: 1. Enter a series of words (including blanks) and encoded them into their equivalent Morse code. 2. Enter a series of encoded Morse code and translate it into its equivalent letters, digits and punctuation marks. 3. Allow the user to keep executing the application multiple times (i.e. encode than decode or vice versa). Some sort of loop depending on when the user chooses to quit? (User may want to simply encode then decode then return to decoding. Part of your grade is to allow a workable interface from the user’s standpoint) 4. Quit the program. Morse Code is: "A" .- "N" -. "1" .---- "B" -... "O" --- "2" ..--- "C" -.-. "P" .--. "3" ...-- "D" -.. "Q"

Respuesta :

Answer:

public class TestMorseConverter

{

   public static void main (String[] args)

   {

       MorseConverter converter = new MorseConverter();

       String englishPhrase = "To be or not to be that is the question";

       String morsePhrase = converter.englishToMorse(englishPhrase);

       System.out.println(morsePhrase);

       System.out.println(converter.morseToEnglish(morsePhrase));

       

   }

}

Explanation: