Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Program Description: A C# app is to be created to produce Morse code. The Morse code assigns a series of dots and dashes to each

Program Description: A C# app is to be created to produce Morse code. The Morse code assigns a series of dots and dashes to each letter of the alphabet, each digit, and a few special characters (such as period, comma, colon, and semicolon). In sound-oriented systems, the dot represents a short sound and the dash represents a long sound. Separation between words is indicated by a space, or, quite simply, the absence of a dot or dash. In a sound-oriented system, a space is indicated by a short period of time during which no sound is transmitted. The international version of the Morse code is stored in the data file Morse.txt.

To process the program, the Morse code data file (Morse.txt) should be read and stored in memory for fast access to the code. Each letter of the alphabet has a Morse code equivalent. After the code table is stored, the user should be prompted for an English language phrase to be entered from the keyboard. This phrase should be encoded into Morse and displayed. One blank should be used to separate each Morse-coded letter and three blanks should be used to separate each Morse-coded word. The user should be allowed to continue with the process of entering a phrase and having it encoded until a sentinel value (0) is received.

Input: The letters and their equivalents are stored in a data file named Morse.txt. Input will consist of the Morse.txt file and well as the sentences entered from the keyboard. The data file should be read and loaded into memory at the beginning of the program before the sentences can be read and encoded. Each line of the data file contains the letter of the alphabet followed by the code equivalent. The data file should be read and stored as a collection in memory for fast and easy access during the program duration. When a sentence is read from the keyboard, it can be translated from the data stored from the Morse code file. The type of collection that can be used to store the Morse code file may be arrays.

Output: Output will consist of the display of the original sentence and it Morse code equivalent. Requirements: ? Required name for the main program: Morse.cs ? You will need to write a separate user-defined class for this program. Please name that Code.cs

Morse.text --------------------------------------------------------------------------------------------------------------------------------------------

1. .----

2. ..---

3. ...--

4. ....-

5. .....

6. -....

7. --...

8. ---..

9. ----.

0 -----

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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

=+ a. How does this change affect the incentives for working?

Answered: 1 week ago