Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For this lab you are required to create a class called CMorseConvert that converts a Text string into Morse Code (kind of). The

For this lab you are required to create a class called "CMorseConvert" that converts a Text string into Morse Code (kind of). The class will not convert the text to dashes and dots but to the words "dash" and "dot". As an example if the class is given the text string "1" the output would be "dot dash dash dash dash". Or if the class is given the text string "123" the output would be "dot dash dash dash dash dot dot dash dash dash dot dot dot dash dash". The CMorseConvert class will need to load the file "codes.dat" (which is already here, you just need to open it and read it in) with the mappings of the letters and numbers to the Morse Code. Here is a partial output of the "codes.dat" file:

A,.-

B,-...

C,-.-.

D,-..

E,.

The class needs to contain just one public function (you can have more but only one will be tested):

string Text2Morse(const string sText)

You can check your conversions using a real Morse Code Translator

I don't have access to codes.dat but you do not need it to write this code.

#include using namespace std;

int main() {

/* Type your code here. */

return 0; }

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

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

1285427106, 978-1285427102

More Books

Students also viewed these Databases questions

Question

What is the Definition for Third Normal Form?

Answered: 1 week ago

Question

Provide two examples of a One-To-Many relationship.

Answered: 1 week ago