Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Overview This program will allow the user to decode messages that are included in graphs by following a depth-first search strategy. 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. 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. You may use the any C++ class libraries, except any that create Huffman codes. 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

Huffman Coding
These are the instructions
It will get the name of the text file and then the user in the main should decide if it should encode or decode

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

Introduction To Constraint Databases

Authors: Peter Revesz

1st Edition

1441931554, 978-1441931559

More Books

Students also viewed these Databases questions

Question

getSymbols ("VIXCLS ", src ="FRED ") vix getSymb01s ("XCLS vix

Answered: 1 week ago