Polynomial Class, Continued
Tom Kelliher, CS18
May 8, 1996
- Working list.cc and list.h files have been provided.
- Skeletal polynomial.cc and polynomial.h files have been
provided.
- A test program and expected output will be provided by Friday.
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.
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
product
else
call SetCoefficient on product using tempTerm
end if
end for
end for
return product
Thomas P. Kelliher
Mon May 6 22:20:01 EDT 1996
Tom Kelliher