Java Polymorphism

I need some help.Not sure why the compiler is screaming at the following code. Thanks in advance.

publicclass Node{

public Node(){}

publicdouble eval(){

System.out.println("Error: eval Node");

return 0;

}

}

publicclass Binopextends Node{

protected Node lChild, rChild;

public Binop(Node l, Node r){

lChild = l; rChild = r;

}

}

publicclass Plusextends Binop{

public Plus(Node l, Node r){

super(l, r);

}

publicdouble eval(){

return lChild.eval() + rChild.eval();

}

public String toString(){

return"(" + lChild.eval()+"+" + rChild.eval() +")";

}

}

publicclass Constextends Node{

privatedouble value;

public Const(double d){ value = d;}

publicdouble eval(){return value;}

}

This is the test class,once i run it I get the following errors: TestArithmetic.java:4: cannot find symbol

symbol : constructor Plus(Plus,Const,Const)

location: class Plus

Node n = new Plus(

publicclass TestArithmetic{

// evaluate ((3 * 5) + (1 / 4))

publicstaticvoid main(String[] args){

Node n =new Plus(

new Plus(

new Const(3),new Const(5)),

new Const(1),new Const(4));

System.out.println(""+ n.eval());

}

}

[3660 byte] By [exl5a] at [2007-11-27 8:34:53]
# 1

Node n = new Plus( new Plus( new Const(3), new Const(5) ) , new Const(1), new Const(4));

You're creating a Plus with three parameters, Plus, Const, Const. The only constructor Plus has takes two parameters, Node, Node. Either take out one of the params when you create it, or add another constructor.

hunter9000a at 2007-7-12 20:31:15 > top of Java-index,Java Essentials,New To Java...
# 2
Yes. Thanks you. I could not quite interpret the compiler errors. It did point to the Plus(){} constructor but not much info there to work with.
exl5a at 2007-7-12 20:31:15 > top of Java-index,Java Essentials,New To Java...
# 3

> Yes. Thanks you. I could not quite interpret the

> compiler errors. It did point to the Plus(){}

> constructor but not much info there to work with.

In typical compiler errors, the first line is the error message,

TestArithmetic.java:4: cannot find symbol

The second line is the symbol it couldn't find

symbol : constructor Plus(Plus,Const,Const)

And the rest is the location where the symbol is

location: class Plus

Node n = new Plus(

hunter9000a at 2007-7-12 20:31:15 > top of Java-index,Java Essentials,New To Java...
# 4
Thank you very much. Now,I understand it better. I appreciate it.
exl5a at 2007-7-12 20:31:15 > top of Java-index,Java Essentials,New To Java...
# 5
You're welcome!
hunter9000a at 2007-7-12 20:31:15 > top of Java-index,Java Essentials,New To Java...