これが多項式のaddメソッドです
public Polynomilal add (Polynomial poly){
//getA()..etc getters for the coefficients of the polynomial.
MyDouble aVal=getA().add(poly.getA());
MyDouble bVal=getB().add(poly.getB());
MyDouble cVal=getC().add(poly.getC());
Polynomial addedPoly=new Polynomial(aVal, bVal, cVal);
return addedPoly;
}
addメソッドのテストケースは
public void testAdd() {
........
........
}