Polynomial Class, Continued

Tom Kelliher, CS18

May 8, 1996

You are expected to add comments to the files that are provided. The purpose is for you to demonstrate your understanding of the code. Of course, as usual, I expect you to document any code that you write.

Polynomial Multiplication

Pseudocode for multiplying A * B:

Let the Polynomial product = 0

for each term of B
   for each term of A
      let tempTerm = the product of the two terms
      if product has a term with the same exponent as tempTerm
         add tempTerm and the term from product and call SetCoefficient on
         call SetCoefficient on product using tempTerm
      end if
   end for
end for

return product

Time in the Lab

Thomas P. Kelliher
Mon May 6 22:20:01 EDT 1996
Tom Kelliher