Ennis
2004-11-06 07:18:01 UTC
public String toString() {
if (poly.getHead() == null) {
return "0.0";
}
Why is the check for if head is equal to null? doesnt the project say
that every polynomial must consist of atleast one term...so the zero
polynomial will have the term 0x^0...so shouldnt the check be
if ((poly.getHead().getDatum() == 0)&&(poly.getHead().getNext() == null)){
return "0.0";
}
if (poly.getHead() == null) {
return "0.0";
}
Why is the check for if head is equal to null? doesnt the project say
that every polynomial must consist of atleast one term...so the zero
polynomial will have the term 0x^0...so shouldnt the check be
if ((poly.getHead().getDatum() == 0)&&(poly.getHead().getNext() == null)){
return "0.0";
}