Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

MUST CODE IN JAVA -DO NOT use any Java\'s existing libraries for data structures

ID: 3902811 • Letter: M

Question

MUST CODE IN JAVA

-DO NOT use any Java's existing libraries for data structures and algorithms such as priority queue, comparator, array list, hashmap, DO NOT USE anything involving existing java libraries because it is not allowed.

-CAN USE ARRAYS / Array of Nodes

-CAN USE NODES

-Build a Huffman tree based on this string message: 'twas brillig, and the slithy toves did gyre and gimble in the wabe: all mimsy were the borogoves, and the mome raths outgrabe. "beware the jabberwock, my son! the jaws that bite, the claws that catch! beware the jubjub bird, and shun the frumious bandersnatch!" he took his vorpal sword in hand: long time the manxome foe he sought -- so rested he by the tumtum tree, and stood awhile in thought. and, as in uffish thought he stood, the jabberwock, with eyes of flame, came whiffling through the tulgey wood, and burbled as it came! one, two! one, two! and through and through the vorpal blade went snicker-snack! he left it dead, and with its head he went galumphing back. "and, has thou slain the jabberwock? come to my arms, my beamish boy! o frabjous day! callooh! callay!" he chortled in his joy. 'twas brillig, and the slithy toves did gyre and gimble in the wabe; all mimsy were the borogoves, and the mome raths outgrabe.

-User is prompt to enter a string to be encoded, when user inputs a string, the output value returned is the encoded value of each character BASED on the tree built from the string message given above.

-everything is coded in java

Explanation / Answer

OUTPUT :

Enter the string to be encoded
twas brillig, and the slithy toves did gyre and gimble in the wabe: all mimsy were the borogoves, and the mome raths outgrabe. "beware the jabberwock, my son! the jaws that bite, the claws that catch! beware the jubjub bird, and shun the frumious bandersnatch!" he took his vorpal sword in hand: long time the manxome foe he sought -- so rested he by the tumtum tree, and stood awhile in thought. and, as in uffish thought he stood, the jabberwock, with eyes of flame, came whiffling through the tulgey wood, and burbled as it came! one, two! one, two! and through and through the vorpal blade went snicker-snack! he left it dead, and with its head he went galumphing back. "and, has thou slain the jabberwock? come to my arms, my beamish boy! o frabjous day! callooh! callay!" he chortled in his joy. 'twas brillig, and the slithy toves did gyre and gimble in the wabe; all mimsy were the borogoves, and the mome raths outgrabe.
Encoded String 10110100101111110000100111100011011100101001011011111010110011000111110101010100101110001111001110010010110111011100010100000101101100101001111111100001010111011101010011101010100011000111100011111010101010011101011011010111001110010111100110111101000101110001111000100101111001111111100101000001111001010010000101111011010111110010100000010011111110001111001011100011110010011011011000011011101001100101001111111100110011000111110101010100101110001111000101101100101111110011000011110111000111000001100100010111110101100001111001111111100101100010101111001111110100101111100011110010111000111100110010001111001110011111111000010010110101001010101011001100010111010000011100011011010111011100101110001111001100100011101001111000010111000011110110010011110111011111111001100101110001111001010011001001110100111100001011100001111011001010010111101110100110001110111001001111110100101111100011110010111000111100110010001000100111100100010001001100100111101111000101011100110001111101010101001110010000100011010001011100011110011101101100001000010111101101100100011100001001101111101010101111111000111001101001111011101001100011101110101011100100011110010110110011001010100010001101111100000101001011011000010101100111100100011100010010110110001010100110111101000100001111101010101110010100001001001101101011101000101111011010111111001011100011110001011011111010010100001011001011111100111011001101111001000111100111000110010001110101000101100010100010101000100111000110001100011111110010111111101010010001111001001110100000101110001111001011010000101110110100001011001011110001111111111001100011111010101010011100101101100110101010001110100110001101110010111100110111101000101110000110010001110101000101111001011000111110101010111001100011111100001101111010000100011101101110110110111110010000010111000011001000111010100010110010001111001110010110110011010101110011001011100011110011001000111100111001111111100001001011010100101010101100110001001110111011100000111110100011111110000011011101100011101101001001110101111111100110010100101110101111110001001100011011111011011101101001011011110101110100010111000110000110010001110101000001011100011110010110100010010111010111110100000010010110011010101110011000111110101010100100110100011000100111001011111010100011111100001101110110010100101110101111111110111000110110101111110011001011010010110111011100011011010111111001100101101001011011101110001111101010101001011100011000011001000111010100000011111010101010010111000110000110010001110101000001011100011110001010010110110000101011001111001000100111001001111010111110001001111111010101100111001101011011101001010101011111100001010001111001101001111010010101010111011100100011110010010111111101101011001101110110010101111101111010111001100011111010101010001001110111011100000110111011111000010001111011110101001000111100010011111110101011001110100111100100100001011010101101000110111101011101000100110111101001010101011001011000101011101111101010101110011001000011111100001011100001100100000111001001001111101111010001011100011110011001000111100111001111111100001001011010100101010100101000000010100101100101111110010110110000101110100000011111000010111110011001100010111010000010011111101110101111011111001000001001101101010001110111000110001110110110000111100111100100011001000111000010101011110100011101110010100101111001010010011001101000111011100101001011110010100100111101000111011101010111001000111100101001100001101100010111001011111010100110111101000100011011111000011001000110101000110010110011001010101011010010111111000010011110001101110010100101101111101011001100011111010101010010111000111100111001001011011101110001010000010110110010100111111110000101011101110101001110101010001100011110001111101010101001110101101101011100111001011110011011110100010111000111100010010111100111111110010101100011110010100100001011110110101111100101000000100111111100011110010111000111100100110110110000110111010011001010011111111001100110001111101010101001011100011110001011011001011111100110000111101110001110000011001000101111101011000011110011111111001011
twas brillig, and the slithy toves did gyre and gimble in the wabe: all mimsy were the borogoves, and the mome raths outgrabe. "beware the jabberwock, my son! the jaws that bite, the claws that catch! beware the jubjub bird, and shun the frumious bandersnatch!" he took his vorpal sword in hand: long time the manxome foe he sought -- so rested he by the tumtum tree, and stood awhile in thought. and, as in uffish thought he stood, the jabberwock, with eyes of flame, came whiffling through the tulgey wood, and burbled as it came! one, two! one, two! and through and through the vorpal blade went snicker-snack! he left it dead, and with its head he went galumphing back. "and, has thou slain the jabberwock? come to my arms, my beamish boy! o frabjous day! callooh! callay!" he chortled in his joy. 'twas brillig, and the slithy toves did gyre and gimble in the wabe; all mimsy were the borogoves, and the mome raths outgrabe.

Process finished with exit code 0

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote