Question: Please in this JAVA PROGRAM make sure to use the main method and the same output is given below. Make sure program works. ------------------------------------------- Write
Please in this JAVA PROGRAM make sure to use the main method and the same output is given below. Make sure program works.
-------------------------------------------
Write a program to implement Huffman coding and decoding. It should do the following: Accept a text message, possibly of more than one line. Create a Huffman tree for this message. Create a code table. Encode the message into binary. Decode the message from binary back to text. If the message is short, the program should be able to display the Huffman tree after creating it. The ideas in Programming Projects 8.1, 8.2, and 8.3 might prove helpful. You can use String variables to store binary numbers as arrangements of the characters 1 and 0. Dont worry about doing actual bit manipulation unless you really want to.
--------------------------------------------
Make sure to use this given main method in this Java Program. Please don't a answer that's already given. Thanks..

/* You need to wtite classes Node, Tree, PriorityQ, Huffman, and HuffmanApp public static void main(String[] args) throws 1OException Huffman huff int value; String stc null; while(true) System.out.print(" Enter first letter of "); System.out.print("enter, show, code, or decode: "); int choice = getchar(); switch(choice) case 'e' System.out printin( "); "Enter text lines, terminate with str = getText(); huff = new Huffman(str); break; case 's' buff.displayTree) break; case 'c' huff.code(): break; case 'd': huff.decode); break; default System.out print("Invalid entry "); end switch 3/ end while ,// end main() Let not visible symbols (Space and Linefeed) are substituted by visible ones C[, T). Then the output may look like: /* You need to wtite classes Node, Tree, PriorityQ, Huffman, and HuffmanApp public static void main(String[] args) throws 1OException Huffman huff int value; String stc null; while(true) System.out.print(" Enter first letter of "); System.out.print("enter, show, code, or decode: "); int choice = getchar(); switch(choice) case 'e' System.out printin( "); "Enter text lines, terminate with str = getText(); huff = new Huffman(str); break; case 's' buff.displayTree) break; case 'c' huff.code(): break; case 'd': huff.decode); break; default System.out print("Invalid entry "); end switch 3/ end while ,// end main() Let not visible symbols (Space and Linefeed) are substituted by visible ones C[, T). Then the output may look like
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
