Program Allow User Decode Messages Included Graphs Following Depth First Search Strategy S Q43899948
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. 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. Show transcribed image text 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.
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.
Expert Answer
Answer to This program will allow the user to decode messages that are included in graphs by following a depth-first search strate…
OR