can you help me complete the method huffmantoText and texttoHuffman public static void huffmanToText(){ //ToDo: convert text to huffman code } public static void textToHuffman(){ //ToDo: convert huffman code to its text equivalent } 1. Input a text that will be converted to Huffman code. 2. Output an error message if the text cannot be converted (e.g. using character/s in the input text that is/are not part of the table Huffman codes). **If you can show the output the Huffman Tree is also good but it's okay also if you don't ****It should be a menu-based console This is sample of the output: Text to Huffman Code Conversion: Enter a text: def Huffman code: 1011100000 1. Input a Huffman code that will be converted to its text equivalent. 2. Output an error message if the input cannot be converted. **If you can show the output the Huffman Tree is also good but it's okay also if you don't ****It should be a menu-based console This is sample of the output: Huffman Code to Text Conversion Enter a Huffman Code: 1011100000 Text: def
can you help me complete the method huffmantoText and texttoHuffman
public static void huffmanToText(){
//ToDo: convert text to huffman code
}
public static void textToHuffman(){
//ToDo: convert huffman code to its text equivalent
}
1. Input a text that will be converted to Huffman code.
2. Output an error message if the text cannot be converted (e.g. using character/s in the input text that is/are not part of the table Huffman codes).
**If you can show the output the Huffman Tree is also good but it's okay also if you don't
****It should be a menu-based console
This is sample of the output:
Text to Huffman Code Conversion:
Enter a text: def
Huffman code: 1011100000
1. Input a Huffman code that will be converted to its text equivalent.
2. Output an error message if the input cannot be converted.
**If you can show the output the Huffman Tree is also good but it's okay also if you don't
****It should be a menu-based console
This is sample of the output:
Huffman Code to Text Conversion
Enter a Huffman Code: 1011100000
Text: def
Step by step
Solved in 3 steps with 1 images