Polynomial.java
public List multiplypoly(Polynomial mPoly){
		List<Term> productPoly = new LinkedList<Term>();
		Polynomial productObject = new Polynomial("");
		String productString = "";
		Iterator<Term> iterateA = terms.iterator();

		while(iterateA.hasNext()) {
			Term multiplierTerm = iterateA.next();
			LinkedList<Term> mPoly_LL = readpoly(mPoly.toString());
			Iterator<Term> iterateB = mPoly_LL.iterator();

			while(iterateB.hasNext()) {
				Term currentTerm = iterateB.next();

				int productCoef = currentTerm.getCoef() * multiplierTerm.getCoef();
				int productExponent = currentTerm.getExponent() + multiplierTerm.getExponent();

				Term productTerm = new Term(productCoef, productExponent);

				productString = productString + productTerm.toString();
			}

			Polynomial tempPoly = new Polynomial(productString);
			productPoly = addpoly(tempPoly);
		}

		return productPoly;
	}
/**multiplies one polynomial (linked list of terms) by another
	@param polyA a linked list of Term objects
	@param polyB a linked list of Term objects
	@return productPoly the product of polyA and polyB - a linked list of Term objects
	*/
multiplies one polynomial (linked list of terms) by another
multiplies one polynomial ( linked list of terms ) by another
public List multiplypoly(Polynomial mPoly){
		List<Term> productPoly = new LinkedList<Term>();
		Polynomial productObject = new Polynomial("");
		String productString = "";
		Iterator<Term> iterateA = terms.iterator();
		while(iterateA.hasNext()) {
			Term multiplierTerm = iterateA.next();
			LinkedList<Term> mPoly_LL = readpoly(mPoly.toString());
			Iterator<Term> iterateB = mPoly_LL.iterator();
			while(iterateB.hasNext()) {
				Term currentTerm = iterateB.next();
				int productCoef = currentTerm.getCoef() * multiplierTerm.getCoef();
				int productExponent = currentTerm.getExponent() + multiplierTerm.getExponent();
				Term productTerm = new Term(productCoef, productExponent);
				productString = productString + productTerm.toString();
			}
			Polynomial tempPoly = new Polynomial(productString);
			productPoly = addpoly(tempPoly);
		}
		return productPoly;
	}
public List multiplypoly ( Polynomial mPoly ) { List < Term > productPoly = new LinkedList < Term > ( ) ; Polynomial productObject = new Polynomial ( "" ) ; String productString = "" ; Iterator < Term > iterateA = terms . iterator ( ) ; while ( iterateA . hasNext ( ) ) { Term multiplierTerm = iterateA . next ( ) ; LinkedList < Term > mPoly_LL = readpoly ( mPoly . toString ( ) ) ; Iterator < Term > iterateB = mPoly_LL . iterator ( ) ; while ( iterateB . hasNext ( ) ) { Term currentTerm = iterateB . next ( ) ; int productCoef = currentTerm . getCoef ( ) * multiplierTerm . getCoef ( ) ; int productExponent = currentTerm . getExponent ( ) + multiplierTerm . getExponent ( ) ; Term productTerm = new Term ( productCoef , productExponent ) ; productString = productString + productTerm . toString ( ) ; } Polynomial tempPoly = new Polynomial ( productString ) ; productPoly = addpoly ( tempPoly ) ; } return productPoly ; }
multiplies one polynomial (linked list of terms) by another
multiplies one polynomial ( linked list of terms ) by another