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:
  • Objective a use one-dimensional arrays; strings and various string-handling methods; file inputand output; console input and output; loops; and conditional program statements. Instruction

Code Translation Table: Character Code Character Code A U B -. . . V . . .- C -.-. W D -.. X -..- E Y -.-- F ..". Z --.. G --. H . . .. UI AWN - I . . ."- J . . .." K -.- . . ... L .-.. 6 -. . . M --. . . N -. 8 O 9 P 0 O R .". ? ..".. . . . (full stop) T\f

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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!