ok i get it but how to put on first line just the root
then put on second line the children of the root left and right then their children
Type: Posts; User: cool_97
ok i get it but how to put on first line just the root
then put on second line the children of the root left and right then their children
yes another thing
please understand the following i don't have the right code if i have it i wouldn't post here these functions were empty that was the assignment to complete them and compile
no i'm not
i'm working on it now
and i check if it's an error i put // to avoid the error in compiling
because this line codeTable=codeTable+bc; was underlined by red color
by the way...
didn't complete it yet trying to solve these three first
These are the classes that i'm working on now
import java.io.*;
import java.util.*;
class Huffman
{
private PriorityQ theQueue;
private String inString; // input from...
what about this function that i wrote
public void displayTree()
{
assistinOrder(root);
int level=0;
while(!q1.isEmpty()){
Node temp = q1.dequeue();...
Exception in thread "main" java.lang.NullPointerException
at HuffmanApp.main(HuffmanApp.java:26)
Exception in thread "main" java.lang.NullPointerException
at HuffmanApp.main(HuffmanApp.java:29)...
no i'm just trying to fix these codes in post 13# and i have already posted the algorithm for it
and this is a forum for what's wrong with my code
if u have comment on this code or how to fix it...
i meant 13#
sry
queueTrees()
makeHuffTree()
makeCodeTable
but not sure if it's correct
mmmm good idea but first of all how to print them in each line
first the root
then two nodes
then 4 nodes .. etc
i'm not insulting him but he said that no one will write "the code for you"
and i'll be thankfull if he could help
anyway his effort is realy appreciated
plz visit thread # 14 i posted my effort
and i have already posted the algorithm
og each function and the purpose of it
thx
Ok let me explain
these three classes were given to us in class to complete the missing functions
the programme do the following
take a line of charecters then print them and encode them to...
ok lets assume we have random values
it should print it like this
55
43 23
15 3 7 18
these are the classes that i have u could compile but 3 out of four functions don't work
Enter first letter of enter, show, code, or decode: e
Enter text lines, terminate with $
cool
$
COOL\...
this is the code
{
int dep=getHeight();
System.out.printf("Height is %d\n",dep);
//Queue q2 = new Queue();
Node current = root;
int counter = 1;
helpdispley(current);
ok be a dear
and help me
in the following code is it correct
private void queueTrees() // put trees in queue
{
HuffmanApp a = new HuffmanApp();
for (int i...
7
hmmmmmmmmmmmmm
then i'm in the wrong forum
need to know how to write it the idea algorithm anything
ii seems that the only one who check and help is you
so i'm doomed
actually nothing is wrong put u could see in post # 4
there 4 empty functions need to fill them up and run the programme
in class tree
u could notice a function called
public void displayTree()
need to complete this function
and i need it to print the tree level by level
will do
thx
main class
import java.io.*;
import java.util.*;
class HuffmanApp
{
public static void main(String[] args) throws IOException
here is the class huffman where i need help in the following functions
private void queueTrees(){
for each char in the frequancy table loop{
if freq =0 do nothing
else
creat a new node...