Question: In Java Write a program that reads an English language phrase and encodes the phrase into Morse code or reads in a phrase in Morse
In Java Write a program that reads an English language phrase and encodes the phrase into Morse code or reads in a phrase in Morse code and converts the phrase into English. Use one space between each Morse-code letter and three spaces between each Morse-code word.
| Character | Code | Character | Code |
| A | .- | T | - |
| B | - | U | ..- |
| C | -.-. | V | - |
| D | -.. | W | .-- |
| E | . | X | -..- |
| F | ..-. | Y | -.-- |
| G | --. | Z | --.. |
| H | . | ||
| I | .. | DIGITS | |
| J | .--- | 1 | .---- |
| K | -.- | 2 | ..--- |
| L | .-.. | 3 | -- |
| M | -- | 4 | .- |
| N | -. | 5 | .. |
| O | --- | 6 | -. |
| P | .--. | 7 | -- |
| Q | --.- | 8 | ---.. |
| R | .-. | 9 | ----. |
| S |
| 0 | ----- |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
