A+ Work




Morse code is a common code that is used to encode messages consisting of letters and digits. Each letter consists of a series of dots and dashes; for example, the code for the letter a is ●─, the code for the letter b is ─●●● and the code for the number 0 is ─ ─ ─ ─ ─. Please check the attached figure. Use the Morse code to build a binary search tree to store each letter or number in one node. Save the binary search tree to a text file similar as the "BinaryTree1.txt" from Lab 3.25.


use the text file saved from Question 1 as the input of the Morse code Binary Search Tree, write a program to let the user input one line of string, and decode the string using the Morse code Binary Search Tree. Considering only alphanumeric characters and ignoring cases. Make sure you use a delimiter symbol between coded letter and number. Here is an example of the input and output.