Program Allow User Decode Messages Included Graphs Following Depth First Search Strategy P Q43785984
This program will allow the user to decode messages that areincluded in graphs by following a depth-first search strategy. Yourprogram should be executed from the command line, and should allowthe user to choose whether to encode or decode a file. Then theprogram should ask for the filename of the file either containing atext message, or the encoded message to be decoded. Finally, theprogram should produce a new file, entitled appropriately, thatwill either contain the encoded or the decoded message. For thishomework you will have to write three different classes. The firstclass will be called Encode, and it will take a message as a textfile. It will encode it into Huffman codes, which will then bepresented to the user. This class should take care of all theencoding parts of your program. The second class should be calledDecode. It an encoded message, which should include the frequencytable at the beginning. Without encoding the frequency table intothe encoded file, you will not be able to decode your encodedfile!!! These two classes will be instantiated in your mainprogram, which should be in its own .cpp file. The main programshould provide the user interface discussed in the previous sectionto the user, and perform all necessary things to complete theassignment, using the Encode and Decode classes. You may createmore classes that you see necessary for the creation of yourprogram. Auxiliary classes may include a class to save the messagewith its frequency table and the Huffman codes that correspond toeach letter, etc.
You may use the any C++ class libraries, except any that createHuffman codes.
must be in C++
this are the instructions
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