public class Polynomial {
private static class TermNode{
private double coefficient;
private int exponent;
private TermNode next;
public TermNode(int exp, double coeff, TermNode nextTerm )
{
coefficient= coeff;
exponent = exp;
next = nextTerm;
}
}
private TermNode first;
public Polynomial() {
first = new TermNode(0,0, null);
}
public Polynomial(double a0)
{
first = new TermNode(0,a0,null);
}
public Polynomial(Polynomial p)
{
first = new TermNode(p.first.exponent, p.first.coefficient, p.first.next);
}
public void add_to_coef(double amount, int exponent) {
first = new Termnode(
}
public String toString() {
}
return s;
This is showing errors I am not able to implement it properly