Question: Getting the Messages Note: Use Java to implement this The Morse code is A .- B - C -.-. D -.. E . F ..-.

Getting the Messages

Note: Use Java to implement this

The Morse code is

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 --..

You have to write a program for an automatic decoder on the assumption that the raw input data has been preprocessed. In this preprocessed form, dots and dashes are represented by two-bit sequences, as indication of end of letter and end of word. These are shown in the table below

Symbol or delimiter

Two-bit sequence

.

01

-

10

End of letter

00

End of word

11

The end of a sentence is denoted by two consecutive end of word sequences, i.e., 1111.

The data for your program will be therefore be entered as a sequence of bit pairs. For example, the message HELLO STOP I LOVE YOU STOP will be represented by the bit sequence

0101010100010001100101000110010100101010001111010100110110010100101010000101011000010011100110100010101000010110001111

In order to reduce searching time, the alphabetic characters should be stored using B+Tree or B*Tree. Make sure your program is well tested.

Step by Step Solution

3.44 Rating (160 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

SE Instead of storing alphabetic characters in B Tree or B Tree we store them in Hashmap MorseCodeDe... View full answer

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 Programming Questions!