Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

THIS IS AN ASSIGNMENT GIVEN TO ME AND I AM AN UNDERGRADUATE STUDENT..ANY HELP WOULD BE WELCOME..THANKS Overview This program will allow the user to

THIS IS AN ASSIGNMENT GIVEN TO ME AND I AM AN UNDERGRADUATE STUDENT..ANY HELP WOULD BE WELCOME..THANKS

Overview This program will allow the user to decode messages that are included in graphs by following a depth-first search strategy.

Syntax Your program should be executed from the command line, and should allow the user to choose whether to encode or decode a file. Then the program should ask for the filename of the file either containing a text message, or the encoded message to be decoded.

Finally, the program should produce a new file, entitled appropriately, that will either contain the encoded or the decoded message. Classes For this homework you will have to write three different classes.

The first class will be called Encode, and it will take a message as a text file. It will encode it into Huffman codes, which will then be presented to the user. This class should take care of all the encoding parts of your program.

The second class should be called Decode. It an encoded message, which should include the frequency table at the beginning. Without encoding the frequency table into the encoded file, you will not be able to decode your encoded file!!!

These two classes will be instantiated in your main program, which should be in its own .cpp file. The main program should provide the user interface discussed in the previous section to the user, and perform all necessary things to complete the assignment, using the Encode and Decode classes. You may create more classes that you see necessary for the creation of your program. Auxiliary classes may include a class to save the message with its frequency table and the Huffman codes that correspond to each letter, etc. Restrictions You may use the any C++ class libraries, except any that create Huffman codes.

Submission - Read this Carefully Your submission should include a set of .h and .cpp files, a README.txt file with any information you want to tell the grader about running your program, and some text files with your best test cases. Your main program should be called HuffmanGraph, and it should be compilable using Dev-C++ and runnable with the command "HuffmanGraph". You should submit your program as a single .zip (zip archive) file. This file should have no directory structure in it -- just the actual files, so extracting them should result in all your original files placed in the current directory.

Grading This program will be graded using the following criteria: Compiling and running Proper execution on a number of my test cases (with valid and invalid inputs) Overall implementation correctness Comments, style, and readability (informative, but not extraneous comments are appreciated) If a project does not compile, do not expect to receive any points. This should encourage you to take care in your submission process.

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

Database And Expert Systems Applications 31st International Conference Dexa 2020 Bratislava Slovakia September 14 17 2020 Proceedings Part 1 Lncs 12391

Authors: Sven Hartmann ,Josef Kung ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

303059002X, 978-3030590024

More Books

Students also viewed these Databases questions

Question

Does a reproach occur?

Answered: 1 week ago

Question

Tell the merits and demerits of Mendeleev's periodic table.

Answered: 1 week ago