So after I messed with it with the help from you guys I got it to do somewhat of what I need it to do
public class PolynomialTestDriver {
public static void main(String[] args){
Polynomial myPoly = new Polynomial();
myPoly.setCoefficient(6, 2);
myPoly.setCoefficient(9,3);
System.out.println(myPoly.getCoeff()+"x^"+myPoly.getDeg());
}
}
however it will only print out the last myPoly.setCoefficient(); its supposed to do print out
2x^6+3x^9 but it only prints 3x^9