Question: Please Help! Im stuck on how to intergrated the morse code. (I added the first part of the code.) *Add a menu to offer the

Please Help! Im stuck on how to intergrated the morse code. (I added the first part of the code.)

*Add a menu to offer the user a choice of processing a telegram bill or translating a message into morse code. The menu should be the first thing displayed when your program begins executing. The menu format should match the one in the Sample Output on page 2.

*Validate the users menu choice. If the user enters any number other than 1 or 2, a descriptive error message should display. See Sample Output below for format.

*If the user chooses the translate to morse code option, your program (for now) should prompt the user for a single letter and then display the cooresponding morse code. If the users input can not be translated into morse code, then a descriptive error message should display. Your program should translate both upper and lower case letters.

*the morse code im struggling to add is in the table.

#include using namespace std; int main() { string Name,Address,City,State; int zip,NumberOfWords,received; double Amount; int dol,qua,dim,nic,pen,rem; cout << "Enter the name of the customer: "; getline(cin,Name); cout << "Enter street address: "; getline(cin,Address); cout << "Enter city: "; getline(cin,City); cout << "Enter state: "; getline(cin,State); cout << "Enter zip code: "; cin >> zip; cout << "Enter the number of words sent: "; cin >> NumberOfWords; Amount = (NumberOfWords/5)*1.5+(NumberOfWords%5)*0.5; //Computing amount Owed cout <> received; cout << "Denomination\t Number ------------\t-------------" << endl; rem = int(received-Amount*100); dol = rem/100; cout << "Dolars\t\t\t" << dol << endl; rem = rem - dol*100; qua = rem/25; cout << "Quaters\t\t\t" << qua << endl; rem = rem - qua*25; dim = rem/10; cout << "Dimes\t\t\t" << dim<< endl; rem = rem - dim*10; nic = rem/5; cout << "Nickels\t\t\t" << nic << endl; pen = rem - nic*5; cout << "Pennies\t\t\t" << pen << endl;

return 0; }

c

Encoding

S, s

. . .

T, t

-

U, u

. . -

V, v

. . . -

W, w

. - -

X, x

- . . -

Y, y

- . - -

Z, z

- - . .

1

Encoding

A, a

. -

B, b

-

C, c

- . - .

D, d

- . .

E, e

.

F, f

. . - .

G, g

- - .

H, h

. . . .

I, i

. .

Letter

Encoding

J, j

. - - -

K, k

- . -

L, l

. - . .

M, m

- -

N, n

- .

O, o

- - -

P, p

. - - .

Q, q

- - . -

R, r

. - .

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