Question: The Morese code was developed by Alfred Vail while he is working in 1830 with Samuel Morse in the invention of electric telegraph . Vail
The Morese code was developed by Alfred Vail while he is working in 1830 with Samuel Morse in the invention of electric
telegraph . Vail created a method by which each letter or number was transmitted individually with a consistent code stripes
Y points , Ie telegraphic signals that differ in the duration of the active signal. Morse recognized the suitability of this
system and he patented together with the electric telegraph. It was known as American Morse Code and was used in the
first transmission by telegraph.
You will write a program that reads a message and should be stored in an array of strings, the strings representing each of
the characters of the message:
Example:
If the message is "Hello World", you should analyze character by character to arm the individual chains:
H - " ," O = "- - -" L = " - " A = " -" etc etc ...
| - | - | - | - | \ 0 | ||
| . | . | . | . | \ 0 | ||
| - | . | - | - | \ 0 | ||
| - | . | \ 0 | ||||
The program should read a string, you must determine the sequence of dots and dashes of each character and save in the array of strings.
Now, lets encrypt the message. In a copy of the settlement, you must place the strings, just that the dots will be dashes and dashes will be points
| - | - | - | - | \ 0 | ||
| . | . | . | . | \ 0 | ||
| - | . | - | - | \ 0 | ||
| - | . | \ 0 | ||||
Finally you must interpret the new codes:
"- - - -" = O
". . . . "= H
"-. -. "= C
"-. "= N
The individual characters are going to put together a string.
You must write a program that has two options:
a) can read a character string ( only alphanumeric and spaces) and
encoding according to the above rules.
b) You can read an encoded according to the above rule and restore the original text message.
The program must be on code C
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
