Question
Objective a use one-dimensional arrays; strings and various string-handling methods; file input and output; console input and output; loops; and conditional program statements. Instruction You
Objective a use one-dimensional arrays; strings and various string-handling methods; file input and output; console input and output; loops; and conditional program statements. Instruction You are asked to a program that translates a Morse code message into the English language. The program will ask the user to enter filenames for two input files, one for the code translation table data and the other for the coded message data, as well as an output file that will receive the decoded message text. Initially, the program reads the code translation table data file and stores the alphabet characters and equivalent Morse code in two one-dimensional arrays. The program will then read the message input file, inspecting each Morse code value and converting it to the English-language equivalent. The program will write decoded words to the output file and will print short informational messages to the console (screen). Morse code words in the message input file have one space between each Morse-coded letter. There is ONE word per line in the data file.
-Here is a sample run. User input appears as bold underline:
Enter the Morse Code translation table file path: c:/temp/morse.txt
Code translation file processed. 39 codes loaded.
Enter the coded message input file path: c:/temp/CodedMessage.txt
Enter decoded message output file path: c:/temp/DecodedMessage.txt Message translation complete.
17 words processed. Here is the output file DecodedMessage.txt contents:
- --Here is the output file DecodedMessage.txt contents:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started