Thursday, December 13, 2018

Morse Code Converter

Examination Programming Challenge

Morse code is a code in which each letter of the English alphabet, each digit and various punctuation marks are represented by a series of dots and dashes. The table shows part of the code. (https://computermethodsinscience.blogspot.com/2018/12/morse-code.html)
Write a program that can convert the entered alphanumeric string to a string in Morse code or convert the entered string in Morse code to the appropriate alphanumeric string.
The graphical user interface of this program must include at least two text fields for input and output and two buttons for direct or inverse transformation commands.

Table. Morse Code
Character     Code
A        .-
B        -...
C        -.-.
D        -..
E        .
F        ..-.
G        --.
H        ....
I        ..
J        .---
K        -.-
L        .-..
M        --
N        -.
O        ---
P        .--.
Q        --.-
R        .-.
S        ...
T        -
U        ..-
V        ...-
W        .--
X        -..-
Y        -.--
Z        --..
0        -----
1        .----
2        ..---
3        ...--
4        ....-
5        .....
6        -....
7        --...
8        ---..
9        ----.
comma        --..—
period        .-.-.-
question mark    ..--..
space        space

No comments:

Post a Comment

3D Vector Operations

3D Vector Operations 3D Vector Operations Enter the components of two 3D vectors: First Vect...