Question: Java. The driver class of your program will have a private and static method called add that adds two polynomials. To add two polynomials, your
Java.
The driver class of your program will have a private and static method called add that adds two
polynomials.
To add two polynomials, your program traverses both lists and examines the two terms at the
current iterator position. If the exponent of one is smaller than the exponent of the other, then
insert the larger one into the result and advance that lists iterator. If the exponents are equal,
then create a new term with that exponent and the sum of two coefficients and advance both
iterators.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
