Write a program to read and add polynomials you should


Problem

We can represent a polynomial as an ordered list of terms, where the terms are ordered by their exponents. To add two polynomials, you traverse both lists and examine the two terms at the current iterator position. If the exponent of one is smaller than the exponent of the other, then insert this one into the result and advance that list's iterator. If the exponents are equal, then create a new term with that exponent and the sum of the coefficients, and advance both iterators.

Write a program to read and add polynomials. You should define a class Term that contains the exponent and coefficient. This class should implement operator

 

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Write a program to read and add polynomials you should
Reference No:- TGS02654196

Expected delivery within 24 Hours